# Why the optimization result of R is NaN?

When I run the following code, I can’t get the optimization result. I don’t understand why?
%code
function [R] = rankrecover(s,Mat,M)
I = eye(MM);
for i = 1:M
for j = 1:M-i+1
idx((2
M-i+2)(i-1)/2+j) = (i-1)M+1+(M+1)(j-1);
end
end
Q = I(idx,:);
% cvx_solver sdpt3
cvx_begin quiet
cvx_precision low
variable R(M,M) complex semidefinite hermitian toeplitz
expressions r(M
M,1)
r = R(:);
expressions q(M*(M+1)/2,1)
q = Q*r;

minimize norm_nuc( R )
subject to
norm(s-Mat*q,‘fro’) <= 1e-1;
cvx_end

Do not use quiet, do not use cvx_precision, share the log output.

## Calling SDPT3 4.0: 156 variables, 61 equality constraints For improved efficiency, SDPT3 is solving the dual problem.

num. of constraints = 61
dim. of sdp var = 30, num. of sdp blk = 2
dim. of socp var = 29, num. of socp blk = 1
dim. of linear var = 2

SDPT3: Infeasible path-following algorithms

## number of iterations = 17 residual of dual infeasibility certificate X = 9.75e-13 reldist to infeas. <= 1.44e-12 Total CPU time (secs) = 0.85 CPU time per iteration = 0.05 termination code = 2 DIMACS: 1.0e+01 0.0e+00 9.0e-01 0.0e+00 -1.0e+00 5.2e-03

Status: Infeasible
Optimal value (cvx_optval): +Inf

CVX reported that the problem is infeasible. All but section 1 of https://yalmip.github.io/debugginginfeasible also applies to CVX.

I try to use YALMIP to solve the problem, but it does not work.Why?

## %code R = sdpvar(M,M,‘full’,‘complex’); r = sdpvar(MM,1,‘full’,‘complex’); q = sdpvar(M(M+1)/2,1,‘full’,‘complex’); c = []; c = [c,R >= 0,r == R(:),R == R’,q == Qr,norm(s-Matq) <= 0.1]; f = norm(R,‘nuclear’); result = optimize(c,f); if result.problem == 0 R = value®; else disp(‘wrong’); end

num. of constraints = 182
dim. of sdp var = 20, num. of sdp blk = 1
dim. of socp var = 29, num. of socp blk = 1
dim. of linear var = 52
dim. of free var = 130
*** convert ublk to linear blk

SDPT3: homogeneous self-dual path-following algorithms

wrong