help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

syntax for eye(X) and Matlab compatibility


From: E. Joshua Rigler
Subject: syntax for eye(X) and Matlab compatibility
Date: Mon, 15 Mar 2004 17:24:31 -0700

Is there any reason, other than the obvious Matlab compatibility, that
newer versions of Octave (i.e. starting sometime after 2.1.50) treat the
following two command lines differently (older versions gave identical
output):


octave:1> disp ([eye(3) .* 2]);
  2  0  0
  0  2  0
  0  0  2
octave:2> disp ([eye (3) .* 2]);
  1  6
octave:3> 


I always thought I was coding in a style appreciated by many Octave
users when I placed a space between my function and its parameter list. 
I guess I'll have to rethink this in order to avoid the problem
illustrated by the example above.

-EJR



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]