Prox is not working. X(:, i+1) is not well defined. When I put X = rand(10,1) and prox_L1(X, 0.5) then it's working. But I am not getting X(:, i+1). I want to run the followin
Mostrar comentarios más antiguos
n = 10;
p=1;
A= rand(n);
A= 0.5*(A'+ A);
i=1;
X(:,i)=rand(n,p);
lambd3(i) = 1/3;
mu = 0.9;
for i = 1:100
a_i = 1/(i+1)^0.5;
L=(norm(A))^2;
beta= abs(min(eig(A)));
s_i=2*beta/L;
gamma_i = 0.005*s_i;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%5
%%Alg1
f_i = -2*X(:,i)'*A'*A;
%2*A'*A*X(:,:,i) - 2*A'*B;
Z_i = X(:,i) - s_i*(f_i);
Y_i = prox_L1(Z_i,gamma_i);
X(:,i+1) = Y_i;
L(i) = norm(X(:,i+1) - X(:,i))
% n(i)=i;
end
n=[1:1:100];
plot(n,L(n),'color',[0.80 0 0], Marker='-.','LineWidth',2,'markersize',4);
1 comentario
feeroz babu
el 25 de En. de 2022
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Mathematics en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!