Using find between two points
33 ビュー (過去 30 日間)
古いコメントを表示
Hello Everyone,
I am trying to use find in between two points, which is giving me error.
When I use
index = find(x>4)
it gives me all 100 values which are greater than x>4
if I use
index = find((x>4) && (x<6))
It gives me error: Operands to the || and && operators must be convertible to logical scalar
values.
I wanted to know how I can find the values by giving two conditions.
0 件のコメント
採用された回答
David Goodmanson
2019 年 3 月 11 日
Hi Darpan,
try it with just one & sign. && is for scalar comparisons, and you have a vector on each side.
その他の回答 (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!