bugGNU Octave - Bugs: bug #48092, ind2sub behaves incompatible to...

 
 

bug #48092: ind2sub behaves incompatible to Matlab regarding return values and is insufficiently undocumented

Submitted by:  Francesco Potortì <pot>
Submitted on:  Thu 02 Jun 2016 11:43:28 AM UTC  
 
Category: Octave FunctionSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Matlab Compatibility
Status: FixedAssigned to: Kai Torben Ohlhus <siko1056>
Originator Name: Open/Closed: Closed
Release: devOperating System: Any

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Mon 11 Jul 2016 11:25:18 AM UTC, comment #4:

I hijacked this bug report and pushed a cset, that hopefully satisfies the documentation:

http://hg.savannah.gnu.org/hgweb/octave/rev/67a44207da71

Additionally I ensured the Matlab compatibility regarding comment #2. A similar bug #47631 was decided not to fix, I agree on the decision made there.

If there is nothing more to add, I'll close this item.

Kai Torben Ohlhus <siko1056>
Project MemberIn charge of this item.
Tue 05 Jul 2016 02:02:49 PM UTC, comment #3:

The help starts with "Convert a linear index to subscripts.".

However, the function accepts even more than one linear index. Just using the plural would probably be enough.

Francesco Potortì <pot>
Fri 01 Jul 2016 09:48:28 AM UTC, comment #2:

I think Francesco means something like

It is quite standard that Octave accepts matrices as input, even if not clearly stated. But, while testings, I found that Matlab behaves differently when 0 or 1 output arguments are given

that is, IND is returned unchanged.

Marco Caliari <caliari>
Project Member
Thu 02 Jun 2016 02:08:01 PM UTC, comment #1:

Please give an example. The documentation is here

https://www.gnu.org/software/octave/doc/interpreter/Advanced-Indexing.html#index-ind2sub

Kai Torben Ohlhus <siko1056>
Project MemberIn charge of this item.
Thu 02 Jun 2016 11:43:28 AM UTC, original submission:

ind2sub() accepts not only a scalar as an argument, but a matrix too. This is undocumented.

Francesco Potortì <pot>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by caliari (Posted a comment)
  • -unavailable- added by mtmiller (Updated the item)
  • -unavailable- added by siko1056 (Posted a comment)
  • -unavailable- added by pot (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 14 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 16 Jul 2016 11:45:34 PM UTCsiko1056Open/ClosedOpen=>Closed
    Mon 11 Jul 2016 11:25:18 AM UTCsiko1056StatusIn Progress=>Fixed
    Mon 11 Jul 2016 11:03:14 AM UTCsiko1056CategoryDocumentation=>Octave Function
      Severity2 - Minor=>3 - Normal
      Priority3 - Low=>5 - Normal
      Item GroupDocumentation=>Matlab Compatibility
      StatusNeed Info=>In Progress
      Assigned toNone=>siko1056
      Release4.0.2=>dev
      Summaryind2sub accepts a matrix as arg, which is undocumented=>ind2sub behaves incompatible to Matlab regarding return values and is insufficiently undocumented
    Fri 03 Jun 2016 06:11:56 PM UTCmtmillerCategoryOctave Function=>Documentation
    Thu 02 Jun 2016 03:03:06 PM UTCmtmillerSeverity3 - Normal=>2 - Minor
    Thu 02 Jun 2016 02:08:01 PM UTCsiko1056Priority5 - Normal=>3 - Low
      StatusNone=>Need Info

    Back to the top


    Powered by Savane 3.1-cleanup1