topinrecgrid no DO loop, use the wonderfull value_locate function!
Return value
the index on the cell according to the 2d array defined by left and bottom.
Parameters
x1d
in
required
y1d
in
required
left
in
required
bottom
in
required
Keywords
OUTPUT2D
CHECKOUT
Examples
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
Version
$Id: inrecgrid.pro 136 2006-07-10 15:20:19Z pinsard $
History
S. Masson (smasson@lodyc.jussieu.fr)
July 3rd, 2002
October 3rd, 2003: use value_locate