[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Question (Re: Dimensional Juggling Tutorial)
I have a simple question, more or less related to
the rebin stuff:
Assume the following routine, which shoud calculate the pairwise
distance of two array of 3-dim vectors:
array=indgen(3,21)
a=array[*,0:5]
b=array[*,6:*]
nA=n_elements(a)/3
nB=n_elements(b)/3
distArr2=fltarr(nA,nB)
for i1=0,nT1-1 do begin
distArr2[i1,*]=sqrt(total((b-rebin(a[*,i1],3,nA))^2,1))
endfor
so far so good, the routine does the job, but is there
a possibility to eliminate the for loop completely?
Greetings,
:-) marc