Hi Johan,
I think I have spotted a bug when trying to duplicate a scalar sdpvar into a 3-dimension sdpvar object:
reproducible code :
P_prev=sdpvar(1,1)
P_prevS=repmat(P_prev,[2,2,2])
I tried with other replication factors than [2,2,2], they all seem to lead to the same error (even [1,1,1]), it seems to come from the MATLAB reshape function:
"Error using reshape
ND sparse arrays are not supported."
This error can be spotted by putting a breakpoint in yalmip\@sdpvar\repmat.m , line 50 (B = reshape(B,siz);).
However, when replacing this line by
try
B = reshape(B,siz);
catch
B = reshape(full(B),siz);
end
It seems to work. Does this solve the issue, or am I messing up something else in YALMIP by doing this?
Best,
Olivier