Multiply two variables


(Saeed Allah) #1

Dear Researchers
Hi
when I multiply two variables , CVX gives an error :

"Error using cvx/quad_form (line 230)
The second argument must be positive or negative semidefinite.

Error in * (line 261)
_ [ z2, success ] = quad_form( xx, P, Q, R );_

Error in test (line 6)
f=x’*y;"
My code :

cvx_begin
variables x(5) alfa
z=ones(5,1);
y=alfa.*z;
f=x’*y;
.
.
.
cvx_end


(Mark L. Stone) #2

This is indefinite, so neither convex nor concave, and can not be entered in CVX. Why isn't CVX accepting my model? READ THIS FIRST!