필터 지우기
필터 지우기

Is it possible to reduce code generation time for simulink Matlab function block?

조회 수: 1 (최근 30일)
We know that when there is a Matlab Function Block in Simulink block diagram compilation phase take time more than usual because of mex file generation process. But it happens just one time after editing the function. This advantage is really good because it saves a lot of time. But when I use sim command to run my Simulink system within a script m-file in an iteration loop, in spite of any change to Matlab Function Block content, mex generation happens in each iteration which cause a huge increase in running time. Is there any way to force Matlab Function Block to use pre-generated mex file in each iteration in order to reduce spare time? I hope you understand what I mean.

채택된 답변

Azzi Abdelmalek
Azzi Abdelmalek 2012년 12월 22일
Instead of Matlab Fcn block use interpreted Matlab Fcn block.

추가 답변 (1개)

Fred Smith
Fred Smith 2012년 12월 26일
As you describe the situation this sounds like a bug. If you are changing non-tunable parameters for your different runs the behavior is expected. Otherwise multiple runs should not generate code. This is heavily tested functionality so there must be something special about your model.
Please contact MathWorks support with reproduction steps; and we'll look into it.
Thanks,
Fred

카테고리

Help CenterFile Exchange에서 Event Functions에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by