Help with combining logical and relational operators

Hi, Is there a way I can shorten this statement without having to write x twice?
if x>=6 && x<10

Antworten (1)

Star Strider
Star Strider am 4 Jun. 2017

0 Stimmen

No.
That is the correct way to constrain ‘x’ to be greater than or equal to 6 and less than 10.

Kategorien

Mehr zu Simulink Report Generator finden Sie in Hilfe-Center und File Exchange

Gefragt:

am 4 Jun. 2017

Kommentiert:

am 4 Jun. 2017

Community Treasure Hunt

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

Start Hunting!

Translated by