# Position of Minimize

Hi everybody.
I’ve got a problem with the position of minimize in my cvx cycle.

Precisely, I have an interval matrix as jacobian.I’m using matlab and I built a cell J{k}, with k from 1 to 16 and every J is a 2x2 matrix.

``````alpha1 =.1
alpha0 =0.004;
beta1=.2;
beta0=0.004;
gamma1=.02;
gamma0=0.004;
delta1=.02;
delta0=0.004;

J{01}=[alpha0 -beta0 ; gamma0 delta0];
J{02}=[alpha1 -beta0 ; gamma0 delta0];
J{03}=[alpha0 -beta1 ; gamma0 delta0];
J{04}=[alpha1 -beta1 ; gamma0 delta0];
J{05}=[alpha0 -beta0 ; gamma1 delta0];
J{06}=[alpha1 -beta0 ; gamma1 delta0];
J{07}=[alpha0 -beta1 ; gamma1 delta0];
J{08}=[alpha1 -beta1 ; gamma1 delta0];
J{09}=[alpha0 -beta0 ; gamma0 delta1];
J{10}=[alpha1 -beta0 ; gamma0 delta1];
J{11}=[alpha0 -beta1 ; gamma0 delta1];
J{12}=[alpha1 -beta1 ; gamma0 delta1];
J{13}=[alpha0 -beta0 ; gamma1 delta1];
J{14}=[alpha1 -beta0 ; gamma1 delta1];
J{15}=[alpha0 -beta1 ; gamma1 delta1];
J{16}=[alpha1 -beta1 ; gamma1 delta1];
``````

I have to study the vector v :

v = min (evaluated in v) of the max(evaluated in J) of the norm (a + J*v,

with a = 2x1 vector that changes its value at the end of every cycles of cvx.

I try this and it works.

``````cv begin
cvx_precision default
variables v(2,1) real;
expression G(length(J));

for kk=1:16
G(kk)=norm(J{kk}*v+a);
end
minimize max(G);

cvx_end
``````

but if I try this:

``````cvx_begin
cvx_precision default
variables v(2,1) real;
expression G(length(J));

minimize max(G);
for kk=1:16
G(kk)=norm(J{kk}*v+a);
end

cvx_end
``````

the cvx_optval (in all the cycles) are equal to zero, even though all G(kk) aren’t equal to zero.

Why the cvx gives me that value of optval?
Thank you a lot for your help

Luca

G is assigned as an expression.Therefore, it needs to be assigned before use in the objective function. This is done in the 1st program, and not done in the 2nd program. If G were a constraint rather than an expression, it could appear before of after an objective function which is well-defined at the tine the objective function is encountered.

Thank you very much. Can I ask you how the problem is seen by cvx if the expression is assigned after the minimize? Has it a mathematical concept or is it a simple big confusion?

Thank you again for your time An expression assigned after the minimize can still affect any constraints which follow the assignment and involve the assigned expression.

Perfect, thanks again! 