gsort does not preserve order of equal elements, in lexicographic sort This i
Reported by Stefan Langenbach
-- Bug description --
gsort does not preserve order of equal elements, in lexicographic sort
This is unlike specified on the gsort help page.
See "Steps to reproduce" for a toy example
-- Scilab error message --
-- How to reproduce the bug --
-->x=ones(8,1);
-->[y,k]=gsort(x); k'
ans =
1. 2. 3. 4. 5. 6. 7. 8.
-->[y,k]=gsort(x,'lr'); k'
ans =
8. 2. 3. 4. 5. 6. 7. 1.
// Here first and last index are swapped