If statement error with less than OR greater than

3 vues (au cours des 30 derniers jours)
Anastasia Zistatsis
Anastasia Zistatsis le 24 Fév 2021
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

Réponse acceptée

Walter Roberson
Walter Roberson le 24 Fév 2021
if lambda <= 0 || lambda >= 2

Plus de réponses (0)

Catégories

En savoir plus sur Matrix Indexing dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by