From bug-request at octave dot org Tue Apr 4 15:19:55 2006 Subject: scripts/set/unique.m in Octave CVS From: "John W. Eaton" To: "Robert S. Weigel" Cc: "bug at octave dot org" Date: Tue, 4 Apr 2006 16:19:45 -0400 On 4-Apr-2006, Robert S. Weigel wrote: | I would like to suggest changing line 61 (diff is attached) of unique.m from | | if (nargin == 2) | | to | | if (nargin == 2) && (size (y, 2) > 1) | | Original behavior: | | octave:1> unique(['a';'b';'a';'c'],'rows') | ans = | | a | a | b | c | | Behavior with change: | | octave:2>unique(['a';'b';'a';'c'],'rows') | ans = | | a | b | c | | This change gives behavior that I expect and behavior that is consistent with | Matlab. Note that the above test gives the same result with both Octave | 2.1.71 and Octave 2.9.5. I made this change. Thanks, jwe ------------------------------------------------------------- Octave is freely available under the terms of the GNU GPL. Octave's home on the web: http://www.octave.org How to fund new projects: http://www.octave.org/funding.html Subscription information: http://www.octave.org/archive.html -------------------------------------------------------------