Info

Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.

Simulink - Speeding up

1 Ansicht (letzte 30 Tage)
JOKY JOKE
JOKY JOKE am 12 Okt. 2011
Geschlossen: MATLAB Answer Bot am 20 Aug. 2021
Hi,
I have read many articles about speeding up SIMULINK so far. I have also seen the Webinars. So far, I still dont know, if it is better to use Simulink blocks, Embedded Matlab or Stateflow. It is clear, that it also depends on the function, that one needs to implement, but is there a general rule, what kind of programming is the fastet? In many cases, I can implement the task in either way...
Thank you.

Antworten (1)

Kaustubha Govind
Kaustubha Govind am 12 Okt. 2011
I hesitate to provide a simple answer to this, but here is goes anyway.
Almost all Simulink library blocks are either implemented as built-in blocks or S-functions in either C/C++ - you might say that these run as fast as possible. However, both Embedded MATLAB blocks and Stateflow also generate a C-based S-function from user-defined code right before simulation starts. So there is some overhead at the start of simulation, but in the simplest sense, they all should have comparable performance during simulation.
Of course there are other tradeoffs - Stateflow and Simulink are good at solving different kinds of problems. Embedded MATLAB is great if you are more comfortable with programming in MATLAB and can limit yourself to the set of supported functions (note that calling unsupported functions using eml.extrinsic will result in these calls being dispatched to the MATLAB interpreter, and you lose performance).

Diese Frage ist geschlossen.

Community Treasure Hunt

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

Start Hunting!

Translated by