; create array of the same size as "xy" and ; fill it with distances from (ic,jc). ; array d is the output. ; A trying to get rid of the nested do loop ; in dist.pro. But not as good as dist.py. pro dist2,xy,xc,yc,d sx=(size(xy))[1] sy=(size(xy))[2] row=findgen(sx)-xc mrow=row for i=0,(sy-2) do begin mrow=[[mrow],[row]] ;how do you stack vectors? endfor col=findgen(sy)-yc mcol=col for i=0,(sx-2) do begin mcol=[[mcol],[col]] endfor mcol=transpose(mcol) d=sqrt(mrow^2 + mcol^2) return end