Hello,
I am trying to avoid using for loops as instructed in the cvx user guide, however, I cant seem to figure out how to do so for the constraints:
My code:
% declare initial variables - avoid doing this in while loop ever time
% size of X is set at runtime and does not change
dim = 2;
Zcell = cell(length(X));
for i = 1:length(X)
Zcell{i} = eval(sprintf('Z%d (%d,%d)',i,d,d));
end
while (abs(diff) >= tol)
cvx_begin quiet
variables Zcell
minimize( myFunction(Z) )
subject to
?????
cvx_end
...
end
How can I substitute ????
with something that says each Zi
is PSD?