Can the constant and gain block be saved as C code variables using the Simulink coder?
Ältere Kommentare anzeigen
Hi all,
I am working to create a library by generating C code with Simulink coder.
When I checked the generated code, it was confirmed that the Contant and Gain blocks are directly used as numbers in C code.
I would like to have the Contant and Gain blocks as variable parameters.
Is this possible? I am wondering which option should be checked if possible.
Thanks.
1 Kommentar
Hyunjun Hyung
am 11 Mär. 2021
Antworten (1)
Vimal Rathod
am 23 Feb. 2021
0 Stimmen
Hi,
You could always change your code after code generation using simulink coder. But if you want to save as variable in gain and constant block you could create a workspace variable and use that in those blocks.
Refer to the following link for more information on the workspace variables.
Kategorien
Mehr zu Deployment, Integration, and Supported Hardware finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!