Hi I got following error when want to minimize a convex problem
Disciplined convex programming error:
Cannot perform the operation norm( {convex}, 1 )
Error in ==> MetricCVX at 29
minimize( norm(C,1) + (0.1 * norm(E,1)) - (0.2 *A) );
here is my code :
D = 12;
N = 6;
Y = -1 * rand(D,N);
C = zeros(N,N);
cvx_begin;
variable M(D,D) ;
expression C(N,N);
cvx_precision high
A = 0;
for i=1:N
for j=1:N
if i==j
C(i,j) = 0;
else
%C(i,j) = exp(- (Y(:,i)-Y(:,j))' * M * (Y(:,i)-Y(:,j)));
C(i,j) = - (Y(:,i)-Y(:,j))' * M * (Y(:,i)-Y(:,j));
end
end
end
for i=1:N
for j=1:N
if i/64 == j/64
A = A + norm((Y(:,i)-Y(:,j))' * M * (Y(:,i)-Y(:,j)))
end
end
end
E = norm( Y- Y*C , 1) ;
minimize( norm(C,1) + (0.1 * norm(E,1)) - (0.2 *A) );
subject to
M >= 0 ;
cvx_end;