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

1 件のコメント

Stephen23
Stephen23 2017 年 6 月 4 日
Why? What is the problem with writing it twice?

サインインしてコメントする。

回答 (1 件)

Star Strider
Star Strider 2017 年 6 月 4 日

0 投票

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

カテゴリ

ヘルプ センター および File ExchangeSimulink Report Generator についてさらに検索

タグ

質問済み:

2017 年 6 月 4 日

コメント済み:

2017 年 6 月 4 日

Community Treasure Hunt

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

Start Hunting!

Translated by