Matlab sort emulation function
P = mtlb_sort(X) P = mtlb_sort(X,dim[,mode])
a scalar, vector, matrix of reals, booleans or a string
a positive scalar integer
a string ("ascend" or "descend")
sort and Scilab
differently in some particular cases:
For a vector
sort(X,'g','i')function call is equivalent to the Scilab
2) of the Matlab dim is equivalent to the Scilab
The Matlab "
"descend") mode is equivalent to the Scilab
mtlb_sort(X[,dim[,mode]]) is used by
mfile2sci to replace
it was not possible to know what were the inputs while porting Matlab code
to Scilab. This function will determine the correct semantic at run time.
If you want to have a more efficient code it is possible to replace
mtlb_sort call by gsort call.
|Report an issue|
|<< mtlb_size||Compatible fonctions||mtlb_strcmp >>|