フィルターのクリア

If statement error with less than OR greater than

2 ビュー (過去 30 日間)
Anastasia Zistatsis
Anastasia Zistatsis 2021 年 2 月 24 日
回答済み: Walter Roberson 2021 年 2 月 24 日
if lambda <= 0 | >= 2
error('value is not valid');
end
I keep getting an error on ">= 2", saying it is an invalud use of the operator.
Why is this and what can I do to fix it?
Thanks

採用された回答

Walter Roberson
Walter Roberson 2021 年 2 月 24 日
if lambda <= 0 || lambda >= 2

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMatrix Indexing についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by