I have the following issue which I cannot figure out. I wish to find the vector that minimizes a function for different values of an angle theta. Hence, I discritize the interval 0, 2pi, and for each step I use cvx in order to find the minimum and the vector. The problem I am having is with regard to storing these values. I tried launching cvx within the loop, and then asigning cvx_optval to a vector but i keep getting the same number popping our every time. I cannot launch cvx before the loop since as the optimal value is outputted after the cvx_end command.
Anyone know of an easy way to fix this