Write 2*x/y in cvx

I’m trying to write 2x/y in cvx I’ve tried 2xinv_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

Why isn't CVX accepting my model? READ THIS FIRST!

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.