-
Use a 3D array to declare a sequence of matrix variables:
variable K(m,m,N)
-
The for loop must be after (“inside”) cvx_begin and variable declarations, and before the minimize statement.
Your serious problem is that if K is the decision variable sequence, the problem is not convex, and can not be handled by CVX. I will assume hte problem is non-convex, unless and until you prove otherwise.Why isn't CVX accepting my model? READ THIS FIRST!