Specify the name of a workspace struct for Simulink coder

조회 수: 1 (최근 30일)
Luis Ruiz
Luis Ruiz 2019년 2월 4일
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.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Simulink Coder에 대해 자세히 알아보기

제품


릴리스

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by