I have values of input varied with time when i put a function in simulink, it only excute the first part
Any advice

 채택된 답변

Paul
Paul 2021년 9월 8일

0 개 추천

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

Mohamed Nafea
Mohamed Nafea 2021년 9월 9일
Thank you, I am very appreciative 👍👍

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Modeling에 대해 자세히 알아보기

질문:

2021년 9월 8일

댓글:

2021년 9월 9일

Community Treasure Hunt

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

Start Hunting!

Translated by