argsort function for MATLAB