Given a convex function
cost(x), we wish to solve the following:
variables x(d) c(d)
maximize(x’ * c)
cost(x) <= 1;
c <= ones(2,1);
-ones(2,1) <= c;
However the following fails and the error is given by the following statement:
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 );
My intentions is to find a point which cost(x) = 1 and my wish is to maximize the l1 norm of such point, i.e. find the point with maximal l1 norm such that cost(x) == 1.
Is there any way to fix this? Can it be done?
Please do advise and thanks in advance.
P.s. For simplicity, let cost(x) = norm(P*x,2) where P is nxd matrix.