On Tue, 8 Feb 2005 21:38:06 +0200
Shlomi Fish <[EMAIL PROTECTED]> wrote:

> On Wednesday 26 January 2005 21:18, Micha Feigin wrote:
> > On Wed, 26 Jan 2005 19:03:41 +0200
> >

[ ... snip ... ]

> > Worked a bit with PDL and it was nice, IIRC there is a similar extension
> > to python, but I have no experience with it. 
> 
> I think it's called SciPy. I think it's not as complete as PDL, which is 
> itself not as complete as Matlab.
> 

Actually I was thinking of python-numeric (NumPy) but from the documentation
scipy is intended to supplement python numeric.

> > There is scilab which is a 
> > nice free matlab like environment. I don't have much experience with it
> > wither but it seems better then octave.
> 
> Yes. Scilab, however, is incompatible with Matlab in its syntax (some things 
> there are more powerful, or otherwise different). There's a program that 
> converts Matlab code to Scilab one, but not the other way around.
> 

And the converter is a bit problematic. The basic language at least is rather
close to matlab though.

You can always use octave which is compatible with something like matlab 4 or 5.

> >
> > There are also numerous libraries for c (a lot of them written in fortran
> > BTW) which allow you to do almost anything.
> >
> 
> Hmmm.. yes.
> 

For some things they are actually the best solution in terms of ease of
programing. One example is for complex numerical PDE boundary value problems
with non uniform grids and/or non square domains (gladly I haven't had to
do this personally yet, but its from very informed sources). Also for nonlinear
ODEs where shock or near shock solutions call for non-uniform and non-static
grids. I can give a few others also.

Matlab is mainly strong in tensor/matrix arithmetic but when its hard to define
the problem that way it can get very inefficient and/or complicated.

> > I'm somewhat stuck with matlab, with occasional excursions to c though
> > since I need to collaborate with others.
> >
> 
> OK.
> 
> > > BTW, I heard from some people who wrote programs in Matlab for their
> > > projects and home-assignments, that took hours on end to run. My programs
> > > never took a
> >
> > Depends on how they wrote them and how heavy the computation is. I have
> > well written programs that can run for several hours but considering the
> > program built a 50,000x50,000 matrix and then computed the first 3000
> > eigenvalues I think three hours is a short time.
> >
> 
> Right. I don't suppose the same program in C would have been much faster. 
> 

I did actually and it took about the same. I did use the same library that
matlab uses (arpack) though so its probably not a good comparison (you need to
be REALLY masochistic to re-implement that one ;-)

> > > lot of time to run, but then again, I knew how to translate them into
> > > efficient Matrix manipulations. Is it normal for some Matlab program to
> > > take a lot of time to run, even if it's well-written, or does this
> > > indicate Matlab illiteracy?
> >
> > If you write your code to use matrix notation it will run rather fast.
> > Matlab can be rediculosly slow with loops. I tried writing the same code
> > using matrix notation and loops and it turned out to be a difference of a
> > few seconds compared to over an hour.
> 
> :-) Nice.
> 
> >
> > BTW matlab also has a profiler and you can alway use the internal compiler
> > to make faster running executables.
> 
> OK.
> 
> >
> > > (Matlab is interpreted by default, but its matrix operations and many
> > > built-in-functions are hard-coded.)
> >
> > You can also write extenssions in c and java.
> >
> 
> Right. Of course, most students don't have the knowledge and/or time 
> constraints to do this.
> 

Its not that difficult and we have several students that do it in our lab for a
workshop my supervisor is running (although it more for accessing external
hardware then to improve speed).

For c there is a library for handling the interface to matlab and java is
supposed to run from inside matlab (the whole editor user interface is actually
written in java. Try running matlab -nojvm under *nix, you will get a text only
interface, although it can still display figures).

Most students are probably unaware of this support or think that its
complicated, or otherwise the idea of using matlab is to learn matlab and not
how to bypass it (such as numerical analysis courses). Its usually useful for
much more complex stuff or to access external system functions (access to
hardware for example) so its also not very useful for most B.Sc and M.Sc
problems.

> Regards,
> 
>       Shlomi Fish
> 
> ---------------------------------------------------------------------
> Shlomi Fish      [EMAIL PROTECTED]
> Homepage:        http://www.shlomifish.org/
> 
> Knuth is not God! It took him two days to build the Roman Empire.
>  
>  +++++++++++++++++++++++++++++++++++++++++++
>  This Mail Was Scanned By Mail-seCure System
>  at the Tel-Aviv University CC.
> 

=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]

Reply via email to