Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

Simulink - Speeding up

조회 수: 2 (최근 30일)
JOKY JOKE
JOKY JOKE 2011년 10월 12일
마감: MATLAB Answer Bot 2021년 8월 20일
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.

답변 (1개)

Kaustubha Govind
Kaustubha Govind 2011년 10월 12일
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).

이 질문은 마감되었습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by