If statement error with less than OR greater than

2 Ansichten (letzte 30 Tage)
Anastasia Zistatsis
Anastasia Zistatsis am 24 Feb. 2021
Beantwortet: Walter Roberson am 24 Feb. 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

Akzeptierte Antwort

Walter Roberson
Walter Roberson am 24 Feb. 2021
if lambda <= 0 || lambda >= 2

Weitere Antworten (0)

Kategorien

Mehr zu Matrix Indexing finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by