If statement error with less than OR greater than

2 次查看(过去 30 天)
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 CenterFile Exchange 中查找有关 Matrix Indexing 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by