[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #42422] ismatrix: Matlab is only true for 2 di
From: |
Rik |
Subject: |
[Octave-bug-tracker] [bug #42422] ismatrix: Matlab is only true for 2 dimensions |
Date: |
Wed, 28 May 2014 16:00:38 +0000 |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:29.0) Gecko/20100101 Firefox/29.0 |
Follow-up Comment #8, bug #42422 (project octave):
Results from ismatrix testing:
For MATLAB R2013b the result is:
>> ismatrix ({1,2;3,4})
ans =
1
>> [x(1:2,1:2).a] = deal (1,1,1,1);
>> ismatrix (x)
ans =
1
>> ismatrix ([])
ans =
1
>> ismatrix (zeros (10, 0))
ans =
1
>> ismatrix (zeros (0,10))
ans =
1
>> x = zeros (0,10,0,0,0)
x =
Empty array: 0-by-10-by-0-by-0-by-0
>> size (x)
ans =
0 10 0 0 0
>> ndims (x)
ans =
5
>> ismatrix (x)
ans =
0
>> x = zeros (0,10,0,1,0)
x =
Empty array: 0-by-10-by-0-by-1-by-0
>> ismatrix (x)
ans =
0
>> isscalar ({1})
ans =
1
>> isvector ([])
ans =
0
>> isvector (1)
ans =
1
>> isvector (zeros (1,0))
ans =
1
>> isvector (cell (1,3))
ans =
1
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?42422>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #42422] ismatrix: Matlab is only true for 2 dimensions, Carnë Draug, 2014/05/25
- [Octave-bug-tracker] [bug #42422] ismatrix: Matlab is only true for 2 dimensions, Rik, 2014/05/26
- [Octave-bug-tracker] [bug #42422] ismatrix: Matlab is only true for 2 dimensions, Michael Godfrey, 2014/05/26
- [Octave-bug-tracker] [bug #42422] ismatrix: Matlab is only true for 2 dimensions, Michael Godfrey, 2014/05/26
- [Octave-bug-tracker] [bug #42422] ismatrix: Matlab is only true for 2 dimensions, Rik, 2014/05/26
- [Octave-bug-tracker] [bug #42422] ismatrix: Matlab is only true for 2 dimensions, John W. Eaton, 2014/05/27
- [Octave-bug-tracker] [bug #42422] ismatrix: Matlab is only true for 2 dimensions, Rik, 2014/05/27
- [Octave-bug-tracker] [bug #42422] ismatrix: Matlab is only true for 2 dimensions, Michael Godfrey, 2014/05/27
- [Octave-bug-tracker] [bug #42422] ismatrix: Matlab is only true for 2 dimensions,
Rik <=
- [Octave-bug-tracker] [bug #42422] ismatrix: Matlab is only true for 2 dimensions, Rik, 2014/05/28