Effacer les filtres
Effacer les filtres

simulink-function block

3 vues (au cours des 30 derniers jours)
Mohamed Nafea
Mohamed Nafea le 8 Sep 2021
Commenté : Mohamed Nafea le 9 Sep 2021
I have values of input varied with time when i put a function in simulink, it only excute the first part
Any advice

Réponse acceptée

Paul
Paul le 8 Sep 2021
This line (and others like it) doesn't do what you think it does:
68.832 < u <= 200
Consider:
u = 203;
68.832 < u <= 200
ans = logical
1
This statement evalautes to true becasue it's really doing two separate operations equivalent to:
temp = 68.32 < u
temp = logical
1
temp < 200
ans = logical
1
In short what you need is:
68.32 < u && u <= 200
ans = logical
0
  1 commentaire
Mohamed Nafea
Mohamed Nafea le 9 Sep 2021
Thank you, I am very appreciative 👍👍

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur General Applications 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