MATLAB2Python

beliavsky at aol.com beliavsky at aol.com
Fri Apr 30 08:19:30 EDT 2004


Sarge <sarge at arena.invalid> wrote in message news:<D2Xjc.28117$Qc.1080799 at twister1.libero.it>...
> Hi, everybody!
> I'm a moderately experienced programmer in Matlab, and looking for a 
> free computational language (Matlab is *REALLY* expensive for an 
> individual, like me).
> I came across Python (actually Scipy) and immediately felt 
> comfortable with the interface and syntax.
> I'm still a newbe, so, before attempting a serious work on it, I'd 
> like to hear any opinion about migration from Matlab to Python, and 
> also a rough comparison between these two languages.
> 
> Thanx in advance, and excuse me for my very bad English (I'm not a 
> native English speaker),
> 
> Sarge

In both Matlab and Fortran arrays indices start with 1 (at least by
default), and x(3:5) references elements x(3),x(4),x(5), whereas in
Python arrays start with 0 and x[3:5] = [x[3],x[4]] -- the element
corresponding to the upper bound is not included in the slice. That is
one issue to watch for.



More information about the Python-list mailing list