which one do u prefer when making for loop in simulink
조회 수: 1(최근 30일)
표시 이전 댓글
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?
댓글 수: 0
Mark McBroom 2022년 12월 29일
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 ).
댓글 수: 3
Find more on Simulink Functions 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!