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

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

                 Summary: ind2sub with empty dimension vector
                 Project: GNU Octave
            Submitted by: None
            Submitted on: Wed 06 Apr 2016 12:45:04 PM UTC
                Category: Octave Function
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Matlab Compatibility
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 4.0.0
        Operating System: GNU/Linux

    _______________________________________________________

Details:

The Octave function ind2sub with an empty dimension vector gives an error. In
Matlab it returns the value of the second argument.

>> ind2sub([], [3 4; 5 6])

ans =
     3     4
     5     6

>> [ii,jj,kk] = ind2sub([], [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]