i have to find optimal a by solving
minimize fi(a)-u l2(L(a)) …>i am sure it is a convex problem
subject to 0<=a<1
where a is square matrix and l2(L(a)) is second smallest eigen value of laplacian matrix ,u is positive real parameter.
while solving i need to write an expression k2=(a./(1-a)).^4 ---------eq 1
(fi(a) = sum of all elements of matrix k2),
how can i write 1st eq 1 inside cvx ?
while i was writing using inv_pos function i got errors Illegal operation: pow_p( {convex}, {-1} ) and y = pow_cvx( x, -1, ‘pow_p’ );
that was a convex function as i mentioned!!! while i am trying to write equation to solve k2 i am getting error Cannot perform the operation: {real affine} ./ {real affine}
Its convexity matters less than you think. You must be able to express it according to CVX’s specific rules; and if you cannot, CVX can’t handle it—even if it is convex.
please check the program
program::
clc;
clear all;
n=4;
alpha=0.4;
eta=3;
p=eta/alpha;
pmin=1;
vect=rand((n*(n-1)/2),1);
rij=zeros(n,n);
r0=sqrt((1.1log10(n))/(pin));
i=[1 0 0;0 1 0;0 0 1];
%creating random distnce matrix in range[0 1] ie 1 sq m
for i=1:n
for j=1:n
if i==j
rij(i,j)=0;
else
rij(i,j)=vect(i+j-2); %rij is symmetric and diagonal values are zero
end
end
end
k1=pmin*((rij/r0).^eta);
cvx_begin
variable fie;
variable aij(n,n) symmetric;
diag(aij)==0;
%(1-aij)>=0.00001;
%variable k2(n,n);
%minimize norm(aij);
for i=1:n
for j=1:n
0<=aij(i,j);
aij(i,j)<=0.9999; %aij should not equal to 1
end
end
minimize sum(sum(pmin+(k1.*pow_p(aij.*inv_pos(aij),p))));
cvx_end
output::::
Error using cvx/times (line 173)
Disciplined convex programming error:
Cannot perform the operation: {real affine} .* {convex}
Error in minimize (line 14)
x = evalin( ‘caller’, sprintf( '%s ', varargin{:} ) );
Error in CVXfie (line 61)
minimize sum(sum(pmin+(k1.*pow_p(aij.*inv_pos(aij),p))));
how can i express a/(1-a) as convex??
should i have to use a different solver?