Hello Johan,
Thanks for your quick answer. The max is because A is a matrix. I am gonna try to explain the problem a little better.
The original problem is:
w=sdpvar(length(n),1,'full','complex');
obj=max(abs(VS*w));
cons=[VP*w == 1];
This is exactly the same as:
VSr=[real(P(LS,:)) -imag(P(LS,:))];
VSi=[imag(P(LS,:)) real(P(LS,:))];
VPr=[real(P0) -imag(P0)];
wr=sdpvar(2*length(n),1);
obj=max(abs(VSr*wr+(VSi*wr)*1i));
cons=[VPr*wr == 1];
The problem is when you want to remove completely complex numbers. Then, with the triangle inequality you can do something like:
obj=max(abs(VSr*wr)+abs(VSi*wr));
But the solution obtained is not as good as in the previous case. I know there is a way od doing this without loosing anything.
Regards,
Ignacio