I’m trying to write 2*x/y in cvx I’ve tried 2*x*inv_pos(y ) but I get the following error
Disciplined convex programming error:
Cannot perform the operation: {real affine} .* {convex}

any suggestions?

*x/y in cvx I’ve tried 2*x*inv_pos(y ) but I get the following error
Disciplined convex programming error:
Cannot perform the operation: {real affine} .* {convex}

any suggestions?

In general no, because it is neither convex nor concave. However, it might be possible to reformulate in some cases, but only if the overall problem is a convex optimization problem.

Please carefully read

Thanks for the reply. Are you referring to my first question? I read the ruleset but can’t seem to figure out how to reformulate this. I defined x and y as normal variables.

`x/y`

as such is not convex and you cannot model it in cvx. Knowing the bigger context can help with reformulation.