MATLAB: If statement error with less than OR greater than

greater thanif statement

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

Best Answer

if lambda <= 0 || lambda >= 2