How to extract simulink block source code

16 visualizaciones (últimos 30 días)
Leonardo Tommasini
Leonardo Tommasini el 16 de Nov. de 2017
Respondida: Birdman el 16 de Nov. de 2017
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.

Respuestas (1)

Birdman
Birdman el 16 de Nov. de 2017
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.

Categorías

Más información sobre Programmatic Model Editing en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by