Jump to content

Simple convex optimization problem fails in CVX

Recommended Posts

I am using the CVX tool from Boyd for convex optimization.

I need to implement the convex function [latex]\frac{1}{xy}[/latex] for positive numbers.


I figured one way which is the same method used when convexifying a Geommetric Program. However for some reason it fails to do a simple case. The code in matlab is:



variables p q r

minimize( r )






[latex]\exp{r}[/latex] is [latex]\frac{1}{2*3}[/latex]. However it fails and says


??? Index exceeds matrix dimensions.


Error in ==> cvxprob.eliminate at 215

temp = reshape(ndxs(temp),size(temp));


Error in ==> cvxprob.solve at 14

[ At, cones, sgn, Q, P, dualized ] = eliminate( prob, true );


Error in ==> cvx_end at 77

solve( prob );

Edited by mermeladeK
Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.