[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Sort not MATLAB compatible
From: |
Eyal Doron |
Subject: |
Sort not MATLAB compatible |
Date: |
Wed, 6 Sep 1995 11:42:58 +0100 (MET DST) |
Hi Guys,
Just thought you'd like to know. The following just broke a MATLAB
M file that was posted on the net:
octave:64> [a,b]=sort([1 2 3 4 1 2])
a =
1 1 2 2 3 4
b =
1 5 6 2 3 4
vs. MATLAB 4.0:
>[a,b]=sort([1 2 3 4 1 2])
a =
1 1 2 2 3 4
b =
1 5 2 6 3 4
Note the different indexing. Now, this is not strictly speaking a bug,
as both indexing schemes are correct. However, its an incompatibility.
Moreover, I think the MATLAB scheme is more logical.
Comments, anyone? John?
Eyal Doron
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Sort not MATLAB compatible,
Eyal Doron <=