Hi all,
I haven’t used CVX in a while, so sorry if this question is basic.
I would like to define, say, a polynomial function p=c_1x_1^2+c_2x_1x_2+c_3x_2^3, where the c_i's are decision variables, but the x_i's are not. I then need access to point evaluations of this polynomial, which would be linear expressions in the coefficients c_i. For example, I want to impose a constraint p(1,2)>5. How do you do this?
Thanks,
-Amirali
The comment section doesn’t seem to give me enough space, so I respond to mcg’s comment here:
Not sure if I completely understand the comment; I don’t want to write p in a separate function. Let me elaborate on my question. If I was doing this, e.g., in YALMIP, I would write:
sdpvar c_1 \ c_2\ c_3\ x_1 \ x_2
p=c_1x_1^2+c_2x_1x_2+c_3x_2^2
replace(p,[x_1,x_2],[1,2])>5 %this would be my constraint
Then, when calling the solver, I would let it know that the decision variables are c_1, c_2, c_3 (and not x_1 and x_2). So I am asking in CVX, (i) how do you distinguish between decision variables and indeterminate variables, and (ii) what is the analogue of the “replace” command above?
Perhaps there is no such special functionality and you are saying that I should use native MATLAB commands?