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: Fri, 15 Apr 2016 18:12:18 +0000
User-agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0

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

The user may not call ind2sub with a [] matrix (willingly), but it may happen
in case a lot of operations are being performed (failure of user to pass the
parameters correctly while scripting/ inability of user to foresee this kind
of problem with data while writing the script). I think we could simply give
the user a warning (upon execution) that this operation can cause a problem in
computations because it is not a logically correct operation (and not because
Octave cannot do it ).

MATLAB trial using 2^30 gives:
>> [ii, jj, kk] = ind2sub ([1, 1, 2^30], [3 4; 5 6])

ii =
     1     1
     1     1

jj =
     1     1
     1     1

kk =
     3     4
     5     6

    _______________________________________________________

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]