bugGNU Octave - Bugs: bug #35162, randperm 2-arg incompatibility

 
 

bug #35162: randperm 2-arg incompatibility

Submitter:  Jesse Rosenstock <jmrosenstock>
Submitted:  Fri 23 Dec 2011 03:58:32 PM UTC
   
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  None
Originator Name:  Jesse Rosenstock Open/Closed:  * Closed
Release:  * 3.4.3 Operating System:  * Mac OS
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sat 24 Dec 2011 03:48:40 PM UTC, comment #2: 

Great, thanks! I'm looking forward to the release.

Jesse Rosenstock <jmrosenstock>
Fri 23 Dec 2011 04:03:57 PM UTC, comment #1: 

The two arg form of randperm was added in a very recent Matlab version (2011b, iirc). I have already added this calling form in the dev version, and it will be part of the impending 3.6 release.

http://hg.savannah.gnu.org/hgweb/octave/log?rev=randperm

Jordi GutiƩrrez Hermoso <jordigh>
Group Member
Fri 23 Dec 2011 03:58:32 PM UTC, original submission:  

The matlab documentation says that randperm(n, k) returns a row vector of k unique integers from 1:n.

The octave version returns a k-by-n matrix.


octave:62> randperm(3, 2)
ans =

   3   1   2
   1   3   2


Jesse Rosenstock <jmrosenstock>

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by jordigh (Posted a comment)
  • -email is unavailable- added by jmrosenstock (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2011-12-23 jordigh StatusNone Fixed
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code