find values between constants in vector
古いコメントを表示
I have a vector freq_n where I want to find the indices corresponding to values between a and b.
freq_in-10*delta_f <= freq_n <= freq_in+10*delta_f
How would I go about doing this? The find() function seems to only allow one relational operator, unless I am doing something wrong? thanks!
採用された回答
その他の回答 (2 件)
Wayne King
2011 年 9 月 21 日
freq = 0:1:500;
[~,indices] = find(freq>20 & freq < 250);
freq(indices)
Leor Greenberger
2011 年 9 月 21 日
カテゴリ
ヘルプ センター および File Exchange で MATLAB についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!