
Binning coordinates (lat and long) into boxes, and performing analysis of other measurements within those boxes

jschroed
I'm aware of the histogram function, but I'm not sure if it is what I'm looking for here.
I tried writing functions that would bin for me, then I could export to excel and just perform the analysis on each bin manually, but I was having problems with indexing. Excuse me, I'm still very new to writing code:
function bin(latitude, longitude, box)
wave latitude, longitude, box
if (latitude>39 & latitude<40 & longitude>270 & longitude<271)
box=1
endif
end
Any help would be greatly appreciated - I'm sure this is a common type of analysis, but I'm just not sure how to do it in Igor. Thank you!
October 18, 2014 at 05:17 pm - Permalink