which one do u prefer when making for loop in simulink

1 vue (au cours des 30 derniers jours)
진회 김
진회 김 le 28 Déc 2022
Commenté : 진회 김 le 3 Jan 2023
Now i try to make for loop system in simulink.
I know that there are two main way to make for loop. Using for iterator or making using state flow.
But i dont know which one is better way to make for loop system in model control
would you recomend me?

Réponses (1)

Mark McBroom
Mark McBroom le 29 Déc 2022
The third option is MATLAB Function block. https://www.mathworks.com/help/ecoder/ug/for-loop.html
The decision on which to use is purely up to you and your desired modeling pattern. If you are using primarily Simulink then I would recommend using the Simulink For Iterator or For Each Subsystem.
Using Stateflow or ML Function block results in a slighty longer initialization time ( C code is generated and compiled for simulation ).
Thanks.
Mark.
  3 commentaires
Mark McBroom
Mark McBroom le 29 Déc 2022
Can you temporarily run the signals of interest out of the subsystem and then watch the data?
진회 김
진회 김 le 3 Jan 2023
when i put a break point or make pause the run, i cant see the interner data of the for loop.

Connectez-vous pour commenter.

Catégories

En savoir plus sur Schedule Model Components dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by