Effacer les filtres
Effacer les filtres

Automatic generation of S function for a c code

1 vue (au cours des 30 derniers jours)
Rupesh
Rupesh le 20 Juil 2013
I have a C code and want generate S function for it using matlab scripting..(Avoid manual steps required for s function generation)..Can any one help me for this

Réponse acceptée

Kaustubha Govind
Kaustubha Govind le 22 Juil 2013
You can use the Legacy Code Tool to generate a C-MEX S-function wrapper for your C-code.
  6 commentaires
Rupesh
Rupesh le 7 Sep 2013
I have to connect these variables(here a and b) using inports in Simulink. and will provide values through test vectors in .m file.. On the same lines output c should be connected to outport of Simulink..
Looking after for your answer
Kaustubha Govind
Kaustubha Govind le 9 Sep 2013
Rupesh: Walter's question was about how you might invoke the C code from another C application and supply inputs. It seems to me that you have to rewrite your C code so that the inputs a and b are passed in as function argument and c as a return argument. Once you have done that, you can use the Legacy Code Tool to generate an S-function so that the block inputs are passed in to 'a' and 'b' and 'c' is assigned back to the block output.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Simulink Coder dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by