If statement error with less than OR greater than

2 visualizaciones (últimos 30 días)
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

Respuesta aceptada

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

Más respuestas (0)

Categorías

Más información sobre Matrix Indexing en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by