Resetting initial values for if statement in Simulink MATLAB
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hello
I do have a simulation and in this one, I have a situation that is chaning. The output of this changing is connected to the if statement that has different conditions. Each condition has also initial value. The first step is that my first condition is zero at the moment and when its time comes it will get some output from if action block. Next time the condition wont satisfied and I need to the output values for this block become zero again. Unfortunately, the values just keep themselve as their last values and wont change. I used reset option in if block but it doesnt work.![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1049540/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1049540/image.png)
By first, I mean that yellow box numbers are 0 0 0 10 and after the time that this condition wont satisfied it should be 0 0 0 0. But it wont.
I would apreciate it if you could help me.
Thanks
0 Kommentare
Antworten (1)
Muthukumar Ganesan
am 12 Jul. 2022
Hi,
Please try setting the output port parameter "Outputs when Disabled" to "Reset" inside the if action subsystems.
Thanks.
0 Kommentare
Siehe auch
Kategorien
Mehr zu Simulink Functions finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!