unique return incorrect value
Reported by David Chèze (@davcheze)
BUG DESCRIPTION:
----------------
the index number of the first of each distinct element is wrong in the test case submitted below
ERROR LOG:
----------
HOW TO REPRODUCE THE BUG:
-------------------------
-->ind=gsort([indx(:) indy(:) indz(:)],"r","i")
ind =
2. 1. 1.
2. 1. 1.
4. 1. 1.
4. 2. 2.
4. 2. 2.
5. 3. 3.
5. 3. 3.
5. 4. 4.
-->[Uind,kindex]=unique(ind,"r")
kindex =
2.
3.
4.
6.
8.
Uind =
2. 1. 1.
4. 1. 1.
4. 2. 2.
5. 3. 3.
5. 4. 4.
kindex(1) should be 1 not 2 !
OTHER INFORMATION:
------------------