Simulink: fast execution of M-code class

조회 수: 2 (최근 30일)
Frank
Frank 2012년 4월 16일
Hi,
I have written in Matlab a class that simulates the behavior of a certain object. During simulation just one function needs to be called: obj.GetForces(x1,x2,x3,x4).
What is the best way to use this class in Simulink to get a fast execution?
Currently I am using the Interpreted Matlab Function. I dont think that this is the best way because at each call the class will be interpreted again. Is there a way to compile the class before usage?
Regards, Frank.

답변 (1개)

Abhishek Gupte
Abhishek Gupte 2012년 5월 9일
The MATLAB Function Block compiles the m-code within it during model compilation. Simulink executes the mex function generated from the block. For more information, see this.

카테고리

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

제품

Community Treasure Hunt

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

Start Hunting!

Translated by