BUG DESCRIPTION:
----------------
Hypermatrices are made native in Scilab 6. Yet, the basic function gsort() does not allow to sort an hypermatrix other than along its 2 first dimensions. The work started to fix the bug 8799 for "r" and "c" shall be extended and completed.
--> h = grand(3,4,3,"uin",0,9)
h =
(:,:,1)
9. 8. 2. 3.
1. 2. 2. 5.
6. 0. 1. 2.
(:,:,2)
9. 6. 8. 3.
9. 9. 8. 9.
1. 0. 8. 0.
(:,:,3)
6. 3. 9. 5.
3. 0. 4. 7.
2. 9. 4. 6.
--> gsort(h,3,"i")
gsort: Wrong type for input argument #2 : string expected.
By the way, the sorting direction should be extended to 1 and 2 as aliases of "r" and "c", as for many other Scilab functions:
--> gsort(h,1,"i")
gsort: Wrong type for input argument #2 : string expected.
ERROR LOG:
----------
gsort: Wrong type for input argument #2 : string expected.
HOW TO REPRODUCE THE BUG:
-------------------------
h = grand(3,4,3,"uin",0,9);
gsort(h, 3);
gsort(h, 1);
gsort(h(:,:,1), 1);