I am writing a mex-function and need to sort some data using the mexCallMATLAB API so that I get the data in the required form. i.e I need the data in descending order along with the index values.
In matlab – [y,i] = sort(x,1,'descend'); does the job for me. Can I simulate the same through the mexCallMATLAB API? If yes, how does it fit in the syntax for the API?
Should I write a C-code for the same?
Thanks in advance