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
Show older comments
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 Comment
feeroz babu
on 25 Jan 2022
Accepted Answer
More Answers (0)
Categories
Find more on Mathematics in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!