Why my simulation slow to run model that use for each block
Show older comments
I got vehicle model with one wheel and I try to convert it to a four wheel model. To make it happen I used a for each block that represent the wheels in order to make the model simpler since each wheel are the same.
(The block alone on the left was at the position of the 'Wheels' subsystem block)
But for some reason the simulation take long time to perform. So I juste change the model by create 4 instances of wheel instead of the for each block, and this option is way more faster.(This is insinde subsystem block named 'Wheels')

(This is what the wheel model look like)

Have you got some solution to improve the for each methode performance, because I still prefere this option since its a clearer model and this olso is easier to manipulate.
Accepted Answer
More Answers (0)
Categories
Find more on Simulink 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!