
function [x,t]=FISTA(A, integration_corrected, lambda, matAl,iterk,t)
if t==0
       t=(1/max(2*eig(matAl'*matAl)))
end
%Calculating the  1/L (Lipschitz function)^(-1)
y=(A');
x1=(y);
x=(A');
s=1;
tmatal=2*t*matAl';

    for k=1:iterk
      c=y-tmatal*(matAl*y-integration_corrected);
      Tlamk=(abs(real(c))-lambda*t);
      Tlamk=(Tlamk+abs(Tlamk))/2;
      Tlamk=Tlamk.*sign(real(c));
      x1=Tlamk;
      x1=(x1+abs(x1))/2;
      s1=(1+sqrt(1+4*s^2))/2;
      y=x1+(s-1)/(s1)*(x1-x);
      s=s1;
      x=(x1);
  
          
    end
end
