Code generation for subsystem only

I am trying to generate code for only a subsystem of a model, while ignoring the rest. Is there a way to set embedded coder to only generate code for a subsystem?
Alternately, is it possible to set a subsystem such that code cannot be generated for it?

Respuestas (1)

Valmir Sadiku
Valmir Sadiku el 16 de Mayo de 2013

1 voto

right click on the subsystem then go to 'C/C++ Code' and select 'Build This Subsystem'

7 comentarios

Milan
Milan el 16 de Mayo de 2013
Thanks. And is there a way to ignore certain subsystems while generating code for an entire model?
Valmir Sadiku
Valmir Sadiku el 16 de Mayo de 2013
just comment out the certain Subsystems.
Milan
Milan el 17 de Mayo de 2013
but i need to generate from model configuration parameter ,because in that we have option for optimization of codes.
Kaustubha Govind
Kaustubha Govind el 17 de Mayo de 2013
Milan: You can still generate code from the whole model, but exclude the subsystem by commenting it out (this feature was introduced in R2012b).
Milan
Milan el 27 de Mayo de 2013
Hi kaustubha
How can we comment the subsystem.can you tell me the process in brief.
Milan
Milan el 27 de Mayo de 2013
Hi kaustubha TO be clear i am using simcoupler ,i dont want to generate code for it .i am using environment control block but it act switch in input side can i have same option at output terminal .
Kaustubha Govind
Kaustubha Govind el 29 de Mayo de 2013
Milan: Please see the video in the link from my previous comment for a demo on commenting out a block in R2012b and later releases. Can you explain what you mean by "it act switch in input side can i have same option at output terminal".

Iniciar sesión para comentar.

Categorías

Más información sobre Simulink Coder en Centro de ayuda y File Exchange.

Preguntada:

el 16 de Mayo de 2013

Community Treasure Hunt

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

Start Hunting!

Translated by