Unable to use sort function inside CVX