[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #32901] "diag" returns empty matrix where matl
From: |
Rik |
Subject: |
[Octave-bug-tracker] [bug #32901] "diag" returns empty matrix where matlab's diag returns [0] |
Date: |
Mon, 28 Mar 2011 18:05:07 +0000 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.16) Gecko/20110323 Ubuntu/10.04 (lucid) Firefox/3.6.16 |
Follow-up Comment #3, bug #32901 (project octave):
>> Well, I remember reading somewhere that every deviation from Matlab
behavior (besides extensions like #-comments, +=, etc..) is considered a bug
in Octave. So valid Matlab code should run in Octave as well.
Actually, the Octave philosophy is that we are not a clone of Matlab. Rather,
we are open-source numerical computing software which is *generally*
compatible with Matlab, but we don't follow them slavishly where it doesn't
appear to make sense; 100% compatibility is not the goal of Octave.
>>The cited command asks for a zero matrix whos first super-diagonal is empty.
Returning [0] here seems consistent to me:
What is the Matlab behavior for the following:
diag (ones(3,0), 2)
If I understand their interpretation the result should be the equivalent of
'zeros (2,2)'.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?32901>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/