I'm very new to Matlab and I applied the density peak algorithm to my data using the Matlab code but I need to calculate sigma and rho. how can I start 
the code is 
    
    disp('Reading input distance matrix')
    fprintf('average percentage of neighbours (hard coded): %5.6f\n', percent);    
    position=round(N*percent/100);
    fprintf('Computing Rho with gaussian kernel of radius: %12.6f\n', dc);
         rho(i)=rho(i)+exp(-(dist(i,j)/dc)*(dist(i,j)/dc));
         rho(j)=rho(j)+exp(-(dist(i,j)/dc)*(dist(i,j)/dc));
    [rho_sorted,ordrho]=sort(rho,'descend');
         if(dist(ordrho(ii),ordrho(jj))<delta(ordrho(ii)))
            delta(ordrho(ii))=dist(ordrho(ii),ordrho(jj));
            nneigh(ordrho(ii))=ordrho(jj);
the variables that i need to compute is 
and