Unable to use sort function inside CVX


I am trying to write an objective function which uses a norm where I need to sort the elements of a matrix. Whenever I call the sort function inside CVX, I get the following error message:

Undefined function ‘sort’ for input arguments of type ‘cvx’.

Are there any alternative ways to sort inside CVX? Any help with this would be appreciated.