|
From: | Quentin Spencer |
Subject: | Re: How does Octave shine? |
Date: | Wed, 20 Sep 2006 20:56:42 -0500 |
User-agent: | Thunderbird 1.5.0.7 (Windows/20060909) |
Jordi Gutierrez Hermoso wrote:
On 20/09/06, Cameron Laird <address@hidden> wrote:What shows Octave off to best advantage for a Matlab-using audience?I can think of a couple of enhancements I particularly enjoy: 1) "Better" syntax. By this I generally mean that I find Octave just slightly more readable in that allows for some mostly cosmetic enhancements like endfunction, endfor, or endif instead of just a plain end.
I forgot about syntax differences. My favorite syntax enhancements are the C-style ++ += *= and /= operators. Another one is the ability to index the output of an expression. Suppose you wanted to find the median value of 101 random variables (ignoring that octave has a median function). In octave, you can do this:
y = sort(rand(1,101))(51); In Matlab, this is a syntax error and requires two steps: x=sort(rand(1,101)); y = x(51); -Quentin
[Prev in Thread] | Current Thread | [Next in Thread] |