Update variables by simulink conditional statement

7 次查看(过去 30 天)
U1 is yellow and u2 is blue
According to the if condition statement, when u1=100u2=0, the true interval is 10 to 50 seconds.
However, looking at the final result value(upper picture is the final one), it is converted to 1 from 10 seconds to the end.
That's my guess.
1. If conditional statement is wrong.
2. "Once" if statement is true at 10 seconds, the value is not updated and is "continued" 1.
I think number 2 is the most likely one
Is there a way to keep updating input values so that the result values are exported 1 value for 10-50 seconds only?

采纳的回答

Fangjun Jiang
Fangjun Jiang 2023-8-18
Inside the If Action subsystem, double click the Outport block, there is an option for "Output when disabled", choose "reset" instead of "held".
  3 个评论

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Subsystems 的更多信息

标签

产品


版本

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by