MATLAB: Breakpoints

find

Hi,
I have a long matrix of breakpoints: for example, 0.19 0.49 0.69 0.93 1.69
is there an easy function to determine if I have a value of 0.55 for example that this value would fall under the third category since it is between 0.49 and 0.69?

Best Answer

Assuming your breakpoints are sorted (I'll call them breakpoints), you could do something like this:
x = 0.55;
find(breakpoints<x,1,'last')
Related Question