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: Mike Miller
Subject: [Octave-bug-tracker] [bug #50426] perms() sort order different than Matlab
Date: Wed, 1 Mar 2017 19:08:09 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:51.0) Gecko/20100101 Firefox/51.0

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

So this could be solved with a simple change


  A = sortrows (v(p), -(1:n));


which seems to work for me but is likely less efficient.

Or by lexicographically sorting the input vector first, which should be more
efficient, and figuring out how to adjust the loop index construction logic to
ensure that it produces the permutations of v in the right order.

    _______________________________________________________

Reply to this item at:

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

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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