Specify the name of a workspace struct for Simulink coder
조회 수: 1 (최근 30일)
이전 댓글 표시
I am using Simulink coder to generate C code for a model.
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
답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!