|
From: | Qianqian Fang |
Subject: | [Octave-bug-tracker] [bug #30114] perms generates different results to matlab |
Date: | Fri, 11 Jun 2010 16:52:44 +0000 |
User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100402 Ubuntu/9.10 (karmic) Firefox/3.5.9 |
Follow-up Comment #2, bug #30114 (project octave): ok, here are the outputs: ========================================== octave octave:1> perms(1:4) ans = 1 2 3 4 2 1 3 4 1 3 2 4 2 3 1 4 3 1 2 4 3 2 1 4 1 2 4 3 2 1 4 3 1 3 4 2 2 3 4 1 3 1 4 2 3 2 4 1 1 4 2 3 2 4 1 3 1 4 3 2 2 4 3 1 3 4 1 2 3 4 2 1 4 1 2 3 4 2 1 3 4 1 3 2 4 2 3 1 4 3 1 2 4 3 2 1 octave:2> perms([2 1 4 3]) ans = 2 1 4 3 1 2 4 3 2 4 1 3 1 4 2 3 4 2 1 3 4 1 2 3 2 1 3 4 1 2 3 4 2 4 3 1 1 4 3 2 4 2 3 1 4 1 3 2 2 3 1 4 1 3 2 4 2 3 4 1 1 3 4 2 4 3 2 1 4 3 1 2 3 2 1 4 3 1 2 4 3 2 4 1 3 1 4 2 3 4 2 1 3 4 1 2 ========================================== matlab >> perms(1:4) ans = 4 3 2 1 4 3 1 2 4 2 3 1 4 2 1 3 4 1 2 3 4 1 3 2 3 4 2 1 3 4 1 2 3 2 4 1 3 2 1 4 3 1 2 4 3 1 4 2 2 3 4 1 2 3 1 4 2 4 3 1 2 4 1 3 2 1 4 3 2 1 3 4 1 3 2 4 1 3 4 2 1 2 3 4 1 2 4 3 1 4 2 3 1 4 3 2 >> perms([2 1 4 3]) ans = 3 4 1 2 3 4 2 1 3 1 4 2 3 1 2 4 3 2 1 4 3 2 4 1 4 3 1 2 4 3 2 1 4 1 3 2 4 1 2 3 4 2 1 3 4 2 3 1 1 4 3 2 1 4 2 3 1 3 4 2 1 3 2 4 1 2 3 4 1 2 4 3 2 4 1 3 2 4 3 1 2 1 4 3 2 1 3 4 2 3 1 4 2 3 4 1 _______________________________________________________ Reply to this item at: <http://savannah.gnu.org/bugs/?30114> _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/
[Prev in Thread] | Current Thread | [Next in Thread] |