Dynamic-Calibration/utils/YALMIP-master/extras/@lmi/sdpvar.m

25 lines
457 B
Mathematica
Raw Normal View History

2019-12-18 11:25:45 +00:00
function X = sdpvar(F)
F = flatten(F);
if isa(F.clauses{1}.data,'double')
X = F.clauses{1}.data;
else
X = [];
for i = 1:length(F.LMIid)
Xi = F.clauses{i}.data;
if size(F.clauses,2)>1
if isempty(X)
X = reshape(Xi,[],1);
else
X = [X;reshape(Xi,[],1)];
end
else
X = Xi;
end
end
end
X = sethackflag(X,0);