Hi,
I have a Simulink model consisting of a controller and a plant. The plant is described using a S function with the Directfeedthrough of all inputs set to FALSE. The Simulink model ran well until I put the S function inside an Enabled Subsystem. Even when a constant "1" was connected to the enable port, there was still an algebraic error reported by Simulink. I could not understand why.
BTW, the reason why I put my S function in an Eanbled Subsystem is for resetting the states of the S function at some point of the simulation (following the idea at https://www.mathworks.com/matlabcentral/answers/39407-simulink-change-continuous-state-value-at-a-given-time-point).
It seems that my question may be relevant to the problem that an enabled system introduces direct feedthrough introduced here https://www.mathworks.com/matlabcentral/answers/20220-conditionally-executed-subsystem-introduces-direct-feedthrough?s_tid=answers_rc1-3_p3_MLT. But there is no answer for that question as well.
Any comments are appreciated!