Info
Cette question est clôturée. Rouvrir pour modifier ou répondre.
Simulink - Speeding up
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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.
0 commentaires
Réponses (1)
Kaustubha Govind
le 12 Oct 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).
0 commentaires
Cette question est clôturée.
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!