breakpoints
조회 수: 2 (최근 30일)
이전 댓글 표시
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?
댓글 수: 0
채택된 답변
Andrew Newell
2011년 6월 11일
Assuming your breakpoints are sorted (I'll call them breakpoints), you could do something like this:
x = 0.55;
find(breakpoints<x,1,'last')
댓글 수: 0
추가 답변 (1개)
Walter Roberson
2011년 6월 11일
[v, idx] = histc(x, [-inf breakpoints]);
then the value you want is idx
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Logical에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!