Specify the name of a workspace struct for Simulink coder

1 vue (au cours des 30 derniers jours)
Luis Ruiz
Luis Ruiz le 4 Fév 2019
I am using Simulink coder to generate C code for a model.
Inside the model I am using a workspace struct, this is the same question from a previous user.
The issue I have is that buses might not solve my request.
I am not using the struct as the I/O of a model/block but rather, I am using the variables inside the struct as the parameters of masked blocks inside the model.
Inside the model I use the struct variables to define constant parameters in the blocks, e.g., seed for random numbers, gains, or limits.
I have a lot of this parameters and it is easier (and convenient) for me to define them in a struct in the workspace, so I only have to pass one variable (the struct) to the Simulink model. Otherwise I would have to pass several parameters to the Simulink model and those are just testing values that does not add anything important to the final result.
The generated code works really well but it will be nice if I could define the name of the struct.

Réponses (0)

Catégories

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

Produits


Version

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by