octave-maintainers
[Top][All Lists]
Advanced

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

fix null assignment


From: Jaroslav Hajek
Subject: fix null assignment
Date: Thu, 18 Sep 2008 13:29:04 +0200

hello,

the attached patch fixes the following problems / Matlab
incompatibilities with null assignment in Octave.

2. a = 1:5; a(1:5) = []
--> a is 0-by-0 in Octave, 1-by-0 in Matlab
3. a = 1:5; a = a'; a(1:5) = []
--> a is 0-by-0 in Octave, 0-by-1 in Matlab
4. a = ones (3); a(:,:) = []
--> a is 0-by-0 in Octave, 0-by-3 in Matlab
5. a = ones (3); a(1:3,1:3) = []
--> a is 0-by-0 in Octave, error in Matlab
6. a = ones (3); a(1:2,1:2) = []
--> a is unaffected in Octave (! BUG), error in Matlab

Further, it adds tests for these cases in test/test_null_assign.m.

regards,

-- 
RNDr. Jaroslav Hajek
computing expert
Aeronautical Research and Test Institute (VZLU)
Prague, Czech Republic
url: www.highegg.matfyz.cz

Attachment: delete_fix.diff
Description: Text Data


reply via email to

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