I am working on a code where the minimum value position is needed. I am trying to code this part inside CVX in the following form
cvx_begin
min_val=val(1);
position=1
for i=1:r
if val(i) <= min_val
min_val=val(i)
position=i
end
cvx_end
However, I receive this error {log-concave} <= {log-concave}
.
Is there another way to represent my scalar values and vector to avoid this error?