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: Rik
Subject: [Octave-bug-tracker] [bug #47631] ind2sub with empty dimension vector
Date: Wed, 06 Apr 2016 15:25:38 +0000
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:43.0) Gecko/20100101 Firefox/43.0

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

I'm not sure we want to follow Matlab in this regard.

Take a simpler example


x = [];
[i,j] = ind2sub ([], 3)
% Now what do the following do in Matlab?
x(3)
x(i,j)


If they both produce errors then it seems like we should be warning the user
as soon as the error condition has been created (the call to ind2sub) rather
than when the indexing x(i,j) is later done.  Particularly as the calculation
of the indices might be done in a subroutine which could be very far removed
from their eventual usage in the main code for indexing.




    _______________________________________________________

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]