필터 지우기
필터 지우기

Code generation of huge Embedded Matlab functions in Simulink

조회 수: 4 (최근 30일)
Christian
Christian 2011년 8월 24일
Hello,
I am working on a Simulink model with several Embedded Matlab Function blocks in it. In one of these blocks, I am using a very huge function with a lot of large expressions in it. So everytime I make a change somewhere else in the model, a new C-code is compiled for the whole model, which takes so much time due to this one huge function in the Embedded Matlab Function block. So, how can I tell Simulink NOT to generate a new C-code for this particular function or for the appropriate Embedded Matlab function block?
  댓글 수: 4
Christian
Christian 2011년 8월 24일
Using 2011a.
And no, the changes do not affect the signal types/dimensions of this EMF block.
Christian
Christian 2011년 8월 24일
My idea was to create a .mex file for the huge function and substitute it with the apprpriate m.file. But when I am trying to start compiling the Simulink model, I get the error:
"Only MATLAB files are supported for code generation. Unsupported file extension 'mexw64'..."

댓글을 달려면 로그인하십시오.

답변 (1개)

Fangjun Jiang
Fangjun Jiang 2011년 8월 24일
It could be a good use case for Model Reference. Put your large EMF block into a model and then reference it. As long as the EMF or that model is not changed, it only needs to be compiled once. And you have other options too to make it run even faster.

카테고리

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

제품

Community Treasure Hunt

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

Start Hunting!

Translated by