topinrecgrid no DO loop, use the wonderfull value_locate function!
Return value
the index on the cell accoring to the 2d array defined by
left and bottom.
Parameters
x1d
in
required
y1d
in
required
left
bottom
in
required
Keywords
output2d
checkout
Examples
res = inrecgrid(xin, yin, left, bottom)
IDL> a=indgen(5)
IDL> b=indgen(7)
IDL> r=inrecgrid([0.25,3.25,2],[4.25,2.8,1.4],a,b)
IDL> print, r
20 13 7
IDL> r=inrecgrid([0.25,3.25,2],[4.25,2.8,1.4],a,a+1,b,b+1,/output2d)
IDL> print, r
0.00000 4.00000
3.00000 2.00000
2.00000 1.00000
Version history
History
S. Masson (smasson@lodyc.jussieu.fr)
July 3rd, 2002
October 3rd, 2003: use value_locate