How to define cvx variable in loop?

variable W(M,M,K) semidefinite

W(:,:,i) will be semidefinite for each i from 1 to k. No for loop required. See How to change the number of variables based on the iteration number? .

1 Like