; create array of the same size as "xy" and ; fill it with distances from (ic,jc). ; array d is the output pro dist,xy,ic,jc,d sx=(size(xy))[1] sy=(size(xy))[2] d=1.0*replicate(0,sx,sy) for i=0,(sx-1) do begin for j=0,(sy-1) do begin d[i,j]=sqrt((1.0*(i-ic))^2 + (1.0*(j-jc))^2) endfor endfor return end