HI -- I read the page on MatlabOctaveCompatibility today and saw that
it missed a couple of gotchas:

- Octave supports in-line operators (+=, -=, etc.)  MATLAB does not

in Octave:

octave:60> x=1;x+=1
x =  2

in MATLAB:

>> x=1;x+=1
??? x=1;x+=1
         |
Error: The expression to the left of the equals sign is not a valid
target for an assignment.

- Octave supports the double-quotes.  MATLAB does not.

in Octave:

octave:61> printf("x ix %d\n", x)
x ix 2

in MATLAB

>> printf("x is %d\n", x)
??? printf("x is %d\n", x)
          |
Error: The input character is not valid in MATLAB statements or expressions.

>>

- While we're at it, MATLAB has no native printf function (though
fprintf does the same thing)

in Octave:

octave:64> printf('boo\n')
boo

in MATLAB:

>> printf('boo\n')
??? Undefined command/function 'printf'.


I though I might add these but I see I need a password.  OTOH these
are simple things.  Maybe you or someone else can add them?



--
Gerald Britton



-- 
Gerald Britton

------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
_______________________________________________
Octave-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/octave-dev

Reply via email to