if with 2 conditions
17 ビュー (過去 30 日間)
古いコメントを表示
i used this statement conditions before it worked well,
but this time Matlab says it work with logic condition only:


how to recover ?
thanks
0 件のコメント
回答 (1 件)
Image Analyst
2021 年 9 月 19 日
What does this say
whos Ree
It's probably a vector, not a scalar.
2 件のコメント
Image Analyst
2021 年 9 月 19 日
You might want to use any or all():
if any(Ree > 100000 & Ree < 1000000) % Check if any of them is in range.
if all(Ree > 100000 & Ree < 1000000) % Checks that ALL of them are in range.
参考
カテゴリ
Help Center および File Exchange で Logical についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!