Hello Prof. Lofberg,
I have a problem where I am trying to find $x$ such $Ax = 0$ and x(1)^2 + x(2)^2 + .... x(N)^2 = N is my constraint.
The typical size of the matrix $A$ is 60000X45 and that of $x$ is 45X1.
I installed YALMIP and tried to solve the example that you posted in your answer. I use the following code:
A = randn(10,5);
b = rand(10,1);
x = sdpvar(5,1);
p = (A*x-b)'*(A*x-b);
h = 1-x(1)^2-x(2)^2;
[diagnostics,xhat] = solvemoment(h == 0,p)
xhat{1}
Unfortunately, I get the following error:
############################################################
Error using svd
Input to SVD must not contain NaN or Inf.
Error in extractsolution>numranks (line 108)
[U{i},S{i},V{i}] = svd(moment{i});
Error in extractsolution (line 23)
[U,S,V,ranks] = numranks(moment);
Error in solvemoment (line 142)
x_extract = extractsolution(momentsstructure,options);
Error in quad1_constraint (line 10)
[diagnostics,xhat] = solvemoment(h == 0,p)
############################################################
Do you happen to know the cause of this error? If it helps, I am using MATLAB R2019a. Thank you for your help.