help-octave
[Top][All Lists]
Advanced

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

diag incompat. with MATLAB


From: John W. Eaton
Subject: diag incompat. with MATLAB
Date: Mon, 13 May 1996 09:14:41 -0500

Eyal Doron <address@hidden> wrote:

: Anybody come across this?
: 
: Matlab 4.0: 
: 
: >>diag(eye(3))
: ans = 
:      1
:      1
:      1
: 
: Octave 1.1.1 :
: 
: octave:3> diag(eye(3))
: ans =
: 
:   1  1  1

The result depends on the value of prefer_column_vectors.

Sometimes Matlab likes to create row vectors (for example, with
commands like clear x; for i = 1:3 x(i) = i; end) and sometimes it
insists on columns (things like x(:)).  I suppose this is Yet Another
Special Case...

jwe


reply via email to

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