function [out] = delta_func(p,param)
%UNTITLED5 Summary of this function goes here
%   Detailed explanation goes here
        epsi=1e-10;
            k=2;
            out1=rand(k,1);out2=rand(k,1);n_iter=0;
            while (sum(abs(out2-out1)>epsi*ones(k,1))>0 && n_iter<500)
                %n_iter
                out1=out2;
                Agotique=(1/k)*inv(diag(param.nt./(k*p*(1+out1)))+inv(diag(param.gamma)+param.lambda*ones(k,1)*ones(1,k)));
                for i=1:k
                    out2(i)=Agotique(i,i);
                end
                n_iter=n_iter+1;
            end
            out=out2;
end

