Use the two-output version of histc(), with the first input being the value associated with the gauges of interest, and with second input being [-inf, the_contour_levels] (you get get() the contour level information from the contour object or contourgroup object if you let it choose the levels automatically.) The second output of histc() will then be the index number into the list of contour levels. For example,
V = [0.01 0.05 0.1 0.2];
contour(TheData, V);
augmented_levels = [-inf, V, inf];
[~, bin] = histc(gauge_levels, augmented_levels);
Now gauge #K whose level was gauge_levels(K), fit into the range augmented_levels(bin(K)) <= the level < augmented_levels(bin(K)+1)
0 Comments
Sign in to comment.