How to extract simulink block source code

Hi everyone,
I would like to ask how to extract the code of Simulink blocks.
If anybody knows I need in specific the code of “ discrete time integrator ” and “ discrete derivative ” blocks.
Thanks to everyone.
Best regards, Leonardo.

답변 (1개)

Birdman
Birdman 2017년 11월 16일

0 개 추천

To extract their code, you need to take Integrator and Derivative block into Subsystem respectively and separately(shortcut is clicking Ctrl-G at the same time). Then, right click on their subsystem, go to C Code->Build This Subsystem and you will have the code related to those blocks. I assume you made necessary arrangements from Configuration Parameters. Hope this helps.

카테고리

도움말 센터File Exchange에서 Programmatic Model Editing에 대해 자세히 알아보기

태그

질문:

2017년 11월 16일

답변:

2017년 11월 16일

Community Treasure Hunt

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

Start Hunting!

Translated by