x, y are two vectors of dimension n. and they are variables in a cvx problem.How can I express x.^2/y?
The code is kind like this:
cvx_begin
variables x(n) y(n)
subject to
x.^2 / y <= (another vector of dimension n)
cvx_end
x, y are two vectors of dimension n. and they are variables in a cvx problem.How can I express x.^2/y?
The code is kind like this:
cvx_begin
variables x(n) y(n)
subject to
x.^2 / y <= (another vector of dimension n)
cvx_end
Presuming y > 0, use quad_over_lin
. You could benefit by reading the CV Users’ Guide, which lists this function, among many other things.
f y is not > 0, the constraint is non-convex and can’t be entered in CVX.