The fact that the solver even began to work suggests that CVX agrees your problem is convex. (It would not have even begun if it did not). What it is saying is that the problem is infeasible: that there are no points that satisfy all the constraints.
If you are certain that the problem is feasible, then you’ve entered it into CVX incorrectly. However, you haven’t offered any source code, so there’s no way anyone can help you. Do look at this post to see how to format source code you include in your post.
Thanks Michael, I am having a look at the link you provided. Meanwhile, here is the code that I wrote:
function [A, W, obj] = algo3(X, U, S, delta, Rprime, Ebs, Beta)
n = size(X,1);
m = size(X,2);
A = zeros(n,n);
W = ones(n,n);
for t = 1:500
for k = 1 : m
constr = constr + eta(:,k)'*Rprime(:,:,k)*eta(:,k);
obj = 0;
obj = obj + W(i,j)*abs(A(i,j));
eta == A*X + U
for i = 1:n
for j = 1:m
if (isnan(S(i,j)) == 0)
if S(i,j) ~= 0
A(i,j) * S(i,j) >= delta;
-delta/2 <= A(i,j) <= delta/2
constr <= Beta*Ebs;
W = update(W,A);
Now that you mentioned it, I am trying to understand the problem with my code. So I want my objective function to solve for A iteratively (for a fixed number of iterations, lets say 500 times). I multiply absolute value of A(i,j) with W(i,j), and update W after each iteration of CVX solving the optimization problem. Should I be declaring A as a CVX variable? If yes, then can I initialize all elements of the CVX variable A to be zero before the first iteration even begins?
Every optimization variable must be declared as a variable in CVX, no exceptions. CVX does not consider initial values, so initializing A to be zero at the beginning does absolutely nothing. The value of A is determined entirely by the solution of the convex optimization problem.
I would suggest you go through the user’s guide and browse the examples so you can get a proper idea of how to use CVX.
You are absolutely right, the value of A is determined by the solution. I declared A as an n x n variable (but not W). But the problem still seems to be infeasible. I guess I should read more CVX examples to get a better understanding.