octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #50426] perms() sort order different than Matl


From: Arun Giridhar
Subject: [Octave-bug-tracker] [bug #50426] perms() sort order different than Matlab
Date: Fri, 31 Mar 2023 20:19:52 -0400 (EDT)

Follow-up Comment #24, bug #50426 (project octave):

With the patched version, the results are exactly what you listed:

octave:4> perms(1:5)(end-10:end,:)
ans =
   1   3   5   2   4
   1   3   4   5   2
   1   3   4   2   5
   1   3   2   5   4
   1   3   2   4   5
   1   2   5   4   3
   1   2   5   3   4
   1   2   4   5   3
   1   2   4   3   5
   1   2   3   5   4
   1   2   3   4   5

octave:5> perms([2 5 4 1 3])(end-10:end,:)
ans =
   2   4   3   5   1
   2   4   1   3   5
   2   4   1   5   3
   2   4   5   3   1
   2   4   5   1   3
   2   5   3   1   4
   2   5   3   4   1
   2   5   1   3   4
   2   5   1   4   3
   2   5   4   3   1
   2   5   4   1   3

octave:6> perms ([pi e])
ans =
   2.7183   3.1416
   3.1416   2.7183

octave:7> ver
----------------------------------------------------------------------
GNU Octave Version: 9.0.0 (hg id: 423996c799a6)




    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?50426>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]