Why does my 'S-Function' block Run Four Times per Timestep?
Afficher commentaires plus anciens
My 'S-Function' block has no inputs, only outputs. One output is a counter, representing the number of times my 'S-Function' block is called. The block seems to be called 4 times per timestep when I step through my model.
My model uses a fixed-step ODE4 solver. I thought it was an algebraic loop causing this error, but adding a Unit Delay did not solve my problem.
Is this behavior expected? How can I make the 'S-Function' block run once per timestep?
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Configure C/C++ S-Function Features dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!