Explanation

It appears you are using the transpose character (') to influence the results of the sort function. Depending on what you are trying to accomplish, this might be inefficient or ineffective.

The sort function with no input arguments sorts the columns of a matrix and the row of a row vector.


Suggested Action

If you want to change the order of the input matrix, while maintaining its original shape, do one of the following, depending on the type of array you input to the sort function:

Note

If a variable you pass to the sort function could be matrix or a vector because the variable's size varies, use the syntax suggested for matrix input.