How to constrain the domain of the variable for CVX computing

搜狗截图20210604160758
I want to find the result only in part of the variable x,like from colomun 1 to 10, so that I can avoid the interference from other colomuns. How can I write the constrain or rewrite the equation.

I don’t know what you are asking. Perhaps you want to use x(1:1o) to do something involving only rows 1 to 10 of x?

Yes,i just want to use x(1:10) for computing in cvx

Do you still have an unresolved question? If so, I don’t understand specifically what it is. If you want to use x(1:10)`, feel free to use it, provided it is used in a dimensionally correct (conformal) way, per the normal rules of MATLAB. If all you ever want to use is 1:10, then declare x to be length 10 instead of n.

Thank you, I have solved my question.