HI!
I am trying to set up a function that solves a least square problem without constraints using Yalmip. However, I get a vector containing some NaNs as the output from Mosek/Yalmip. Following is the code:
Z = [0.0100
0
0.0300
0
0
0
0.0456
-0.1047
0
0
0
0
0
0
0
0
0.0300
0
0.0900
0
0
0
0.1367
-0.3142
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0.0456
0
0.1367
0
0
0
0.2077
-0.4772
-0.1047
0
-0.3142
0
0
0
-0.4772
1.0968];
F_T = 3.0607;
thetaHat = sdpvar(64,1);
residuals = F_T - Z*thetaHat;
optimize([],norm(residuals,2))
theta = value(thetaHat);
Mosek returns this:yalmipversion: '20190425'
yalmiptime: 1.4075
solvertime: 0.2735
info: 'Successfully solved (MOSEK)'
problem: 0
I know here I have just used one data point. But I have to call this function again and again, with successively one more data point than before. Could anyone help me with why is MOSEK returning NaN even when solution status is SOLVED? Thanks!