RSS is matrice,as is a vector,Why the solution turns out to be infeasible and wrob is a NaN vector,what’s the problem?
cvx_begin
variables wrob(n);
variable u(1);
minimize((wrob)'*Rss*(wrob));
subject to
u==wrob'*as;
imag(wrob'*as)==0;
u>=3*norm(wrob)+1;
cvx_end
Erik_M
March 12, 2014, 4:55pm
2
What does the matrix Rss look like? Are you certain that it is positive definite?
mcg
(Michael C. Grant)
March 12, 2014, 6:06pm
3
If it weren’t positive definite, CVX would have rejected the problem.
mcg
(Michael C. Grant)
March 12, 2014, 6:07pm
4
Looks to me like you intended for wrob
to be complex, but you did not declare it as complex. (Otherwise, why have imag(wrob'*as)==0
?
mcg
(Michael C. Grant)
March 12, 2014, 6:09pm
5
What is your evidence that this is feasible?
Well, to be a stickler, CVX would have rejected the problem if RSS was not positive semi-definite.
Erik_M
March 12, 2014, 8:59pm
7
Is it possible that the matrix is just barely positive semi-definite? Enough to not throw an error, but not enough to prevent numerical problems?
mcg
(Michael C. Grant)
March 12, 2014, 9:37pm
8
I’m not sure the solvers are sensitive in that manner.
Another error appeared every time I declare" variable wrob(n) complex;",it said “??? Error using ==> variable at 133
Index exceeds matrix dimensions.”
For n=10; “imag(wrob’as)==0" is for "u>=3 norm(wrob)+1;”, or it may appear “complex> constant” as a error, right?
mcg
(Michael C. Grant)
March 16, 2014, 2:09am
11
No because u is real. CVX assumes a variable is real until you tell it otherwise. You cannot force a variable to be complex by putting it an equality constraint; it will instead force the complex part to have a zero imaginary part.
mcg
(Michael C. Grant)
March 16, 2014, 2:10am
12
As for the odd error message I suggest you submit a bug report to http://support.cvxr.com with a small snippet of code that reproduces the error,