Find the position of the element of a vector

Hi

I need to utilize sort function but It seems that in cvx it cannot be utilized . Therefore, I decided to utilize ‘Max’, but I cannot find index of maximum value neither by max function nor by Find function. I will appreciate you if advise me how I can find the index of maximum element in vector.
Best wishes,

Please read Can i sort in cvx?

Thanks for your reply. But my question is about how I can find the position of the element of a vector?
I will appreciate you if advise me.

I advised you to read the linked forum thread.

You are trying to do something non-convex. So if it can be done at all, it will require use of the MIDCP capability, I suppose using a Big M approach, and you will have to figure that out.