Why does my 'S-Function' block Run Four Times per Timestep?
Mostra commenti meno recenti
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?
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Configure C/C++ S-Function Features in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!