octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #47631] ind2sub with empty dimension vector


From: Aditya Manglik
Subject: [Octave-bug-tracker] [bug #47631] ind2sub with empty dimension vector
Date: Mon, 11 Apr 2016 10:50:35 +0000
User-agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0

Follow-up Comment #4, bug #47631 (project octave):

I would like to work on this. 
Upon testing the MATLAB outputs:

>> x=[];
>> [i,j] = ind2sub ([], 3)

i =
     1

j =
     3

I think this output might be wrong.

>> x(3)
Index exceeds matrix dimensions.
 
>> x(i,j)
Index exceeds matrix dimensions.

Should Octave give the same error "Index exceeds matrix dimensions." for the
ind2sub command?
 
More MATLAB testing gives:

>> [ii, jj, kk] = ind2sub ([1, 1, sizem], [3 4; 5 6])
Error using sizem (line 21)
Not enough input arguments.

>> [i,j] = ind2sub ([0, 0], 3)

i =
   NaN


j =
   NaN

 

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?47631>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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