subroutine pdist(np,x,scale,nbins,y) c calculate distribution function for x, store in y c np is the number of points in x c mx is the memory spacing for the x-array c distribution will be calculated for the range from -scale to + scale c nbins is the number of bins c my is the memory spacing for the y-array c-------------------------------------------------------------------------- c include 'param_sz.h' include 'ucom.h' c dimension x(2,imaa),y(2,imaa) c-------------------------------------------------------------------------- c* dx=2.*scale/(nbins-1) rn=1./np do 10 i=1,nbins y(1,i)=0. 10 continue do 20 i=1,np j=(x(1,i)+scale)/dx + 1.5 if(j.lt.1)j=1 if(j.gt.nbins)go to 20 y(1,j)=y(1,j)+rn 20 continue do 30 i=2,nbins y(1,i)=y(1,i-1)+y(1,i) 30 continue return end c++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*