How to implement condition in if-else block in simulink if the condition driving the block is a calculated state from if or else action subsystem blocks?

3 views (last 30 days)
I am trying to implement a conditional execution of system of ODEs in Simulink. The condition is evaluated using one of the computed states. I wish to use the value of this state as a conditional parameter in the If decision block. However, I am getting an error of invalid loop. Below is a snapshot:
zeta is a computed state (involved in system of ODEs) inside the if action subsystem. I want to use the value of zeta at each time step in the If block to determine whether to use the if action or else action.
I would appreciate any help on this or an alternate method of implementation. Thanks

Answers (0)

Categories

Find more on Modeling in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!