How can I put conditional setting (if/else) on switch case block in Simulink?
Afficher commentaires plus anciens
I want to put two conditions, for case 1 and case 2, for example:
case 1 - if u1 >=20
case 2 - elseif u1 <= 20
How can I do this if the switch case block only accept scalar?

Réponses (1)
Paul
le 4 Fév 2023
0 votes
Hi Gabryella,
Please clarify the question. This logic:
case 1 - if u1 >=20
case 2 - elseif u1 <= 20
works when u1 is a scalar, but won't work in the Switch Case because that only checks for equality of integers using ismember-like logic.
Catégories
En savoir plus sur Modeling dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!