GNU Octave’s more beautiful Matlab syntax #octave has build up quite a number of improved syntax features…

GNU Octave's more beautiful Matlab syntax

#octave has build up quite a number of improved syntax features compared to mathworks #matlab. Let me list a few that I find noteworthy:

Octave has default arguments for functions: function r = func(a=1,b=2)

Octave has assignment operators, like: += , -= , *=

Octave has the very handy “vec” operator: vec =@(m) m(:);

Octave has broadcasting, thus almost no “bsxfun” is required

Octave has also ! as “not”-operator

Octave can start comments also with a hash

Maybe Mathworks can use these features also in the next Matlab versions?!

Now, if octave would allow to omit the end-statements like endif, endfor, endswitch and deduces nesting from indentation like #python; this would be awesome! Maybe in octave version 4.0?!

For the Empirical Gramian Framework #emgr version 2.5, I wrote a customized version using octave's advanced syntax which looks a lot more beautiful than the matlab code:

(View on Google+)

Posted in gplus.