Start function of Matlab S-function is called during code generation

Hi,
I noticed a strange behavior while writing a Matlab S-function: when the model is built (code generation), the simulation "Start" function (in the Matlab file) is called once during the build process, while the Terminate is never called. Is it as expected? I would have expected that no simulation function is ever called during code generation. I'm using Matlab R2013a.
TIA,
- Florent

답변 (1개)

Kaustubha Govind
Kaustubha Govind 2014년 2월 18일

0 개 추천

Are you sure that the Terminate function is never called? If you look under "Calling Structure for Code Generation" on the documentation page for Simulink Engine Interaction with C S-Functions, this is supposed for be the calling order during code-generation.

카테고리

도움말 센터File Exchange에서 Simulink Coder에 대해 자세히 알아보기

제품

질문:

2013년 12월 31일

답변:

2014년 2월 18일

Community Treasure Hunt

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

Start Hunting!

Translated by