Hello,

I am trying to solve the following optimzation problem in cvx (image because I don’t know how to type that in mathtype)

and I am having some trouble with it. I am getting not very descriptive errors. My code is the following:

```
cvx_begin quiet
disp('searching for 2-norm soft margin kernel matrix weights and param - eqn 45');
% optimization variables
% TODO - can we make this dynamic?
variables u1 u2 u3 u4 u5 u6
variable t
variable lambda
variable v(train_size)
variable tau
% objective function
minimize( t );
% constraints
subject to
K_prime = u1*kernel_guesses{1} + u2*kernel_guesses{2} + u3*kernel_guesses{3} + ...
u4*kernel_guesses{4} + u5*kernel_guesses{5} + u6*kernel_guesses{6};
trace(K_prime + tau*eye(train_size+test_size)) == trace_val;
K_prime == semidefinite(train_size+test_size);
v >= 0;
tau >= 0;
% LMI
K_tr_prime =
u1*kernel_guesses{1}(1:train_size, 1:train_size) + ...
u2*kernel_guesses{2}(1:train_size, 1:train_size) + ...
u3*kernel_guesses{3}(1:train_size, 1:train_size) + ...
u4*kernel_guesses{4}(1:train_size, 1:train_size) + ...
u5*kernel_guesses{5}(1:train_size, 1:train_size) + ...
u6*kernel_guesses{6}(1:train_size, 1:train_size);
[
(gram(K_tr_prime, train_labels) + tau*eye(train_size))
(ones(train_size,1) + v + lambda*train_labels);
(ones(train_size,1) + v + lambda*train_labels)'
t
] == semidefinite(train_size+1);
cvx_end
```

And my errors are the following:

```
Error using eig
Input to EIG must not contain NaN or Inf.
Error in maxstep (line 64)
mindxs = min(psdeig(reldx, K));
Error in wregion (line 99)
maxt1 = min(maxstep(dx,xc,uxc,K),
maxstep(dz,zc,uzc,K));
Error in sedumi (line 444)
[xscl,yNxt,zscl,y0Nxt, w,relt,
dxmdz,err, wr] = ...
Error in cvx_solve_sedumi (line 99)
[ xx, yy, info ] = sedumi( At, b, c, K, pars
);
Error in cvxprob/solve (line 383)
[ x, y, status, tprec, iters ] =
feval( sfunc, At, b, c, cones,
quiet, prec );
Error in cvx_end (line 77)
solve( prob );
Error in main_aud_cvx>classify (line 274)
cvx_end
```

Which I can’t really do much with. What exactly am I doing wrong? Is it how I’m using the u1-u6 variables?