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!