Hello all,
I have the following code
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
N = 50;
h = 1/N;
H1 = [ones(1,N-10) zeros(1,10)].';
H2 = 5*[ones(1,N-10) zeros(1,10)].';
x = sdpvar(N,1);
y = sdpvar(N,1);
Objective = 0.5*h*(sum(log(x))+sum(log(1-y.^2)));
Constraints = set(sum(h*abs(H2).*sqrtm(x).*y.*sqrt(abs(H1).^2+1/var))-0.5*sum(h*abs(H2).^2.*(x-1))-sum(h*real(conj(H2).*H1)) == 0);
Constraints = Constraints + set(sum(h*x) == 1);
Constraints = Constraints + set(-1<=y<=1)+set(x>=0);
assign(x,1)
assign(y,1)
solvesdp(Constraints,-Objective)
solx = double(x);
soly= double(y);
Objective = 0.5*h*(sum(log(solx.*(1-soly.^2))));
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Now, using this code, I obtained that the maximal objective value is equal to 0.0819. However, if I simply choose the following solution
solx = ones(N_partition,1);
soly = H1./sqrt(abs(H1).^2+1);
which satisfy all the constraints, then the obtained objective is bigger = 0.2773 !!
1. Where is my mistake?
2. Why when I changed the objective function from
Objective = 0.5*h*(sum(log(x))+sum(log(1-y.^2)))
to
Objective = 0.5*h*(sum(log(x.*(1-y.^2))))
which are essentially the same, I obtained different solutions?
Thanks a lot!