Help with combining logical and relational operators

3 vues (au cours des 30 derniers jours)
Nnaemeka Ngwu
Nnaemeka Ngwu le 4 Juin 2017
Commenté : Stephen23 le 4 Juin 2017
Hi, Is there a way I can shorten this statement without having to write x twice?
if x>=6 && x<10
  1 commentaire
Stephen23
Stephen23 le 4 Juin 2017
Why? What is the problem with writing it twice?

Connectez-vous pour commenter.

Réponses (1)

Star Strider
Star Strider le 4 Juin 2017
No.
That is the correct way to constrain ‘x’ to be greater than or equal to 6 and less than 10.

Catégories

En savoir plus sur PHY Components dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by