Strange error with Linear and Conic constraints

I also encountered a similar error message when adding the following conic constraints:

variable x(3);
variable z(3);
variable w(3);
maximize  log(1+x(1)) + log(1+2*x(2)) + log(1+x(3)) - sum(x)
subject to
     x >= 0;
     z(1) + w(1) == - c * x(1);
     z(2) + w(2) == - c * x(2);
     z(3) + w(3) == - c * x(3);
     norm(z,1) + norm(w,2)  - A*x <= 10;

The problem occurs when I have both linear constraints and the last constraint. Without the linear constraints, it issues no error. Below is the error message:

Error using  
Inner matrix dimensions must agree.
Error in cvxprob/eliminate (line 131)
            P       = P * cvx_invert_structure( xR );
Error in cvxprob/solve (line 17)
[ At, cones, sgn, Q, P, dualized ] = eliminate( prob, true, shim.dualize );
Error in cvx_end (line 79)
        solve( prob );
Error in solve_parametric (line 97)
cvx_end

Could it be a bug? Should I rewrite the conic constraint in a different way?

1 Like