- Define parameters in the MATLAB workspace and reference them using the “Model Explorer”, you can also change types and size of existing parameters.
- In the configuration property window, use ‘tunable’ parameters, which allows you to change the values without altering source code.
Generic C code generation with Simulink
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
I would like to generate generic C code from a ‘MATLAB Function’ block.
How could I change input files parameters (size, type) without loading any sources files ?
Does Simulink code generation work like MATLAB Coder ? (especially for C/C++ Dynamic Library).
0 comentarios
Respuestas (1)
Jatin
el 2 de Sept. de 2024
Hi Alvins,
As per my understanding, you are trying to generate C code from Simulink model which involves ‘MATLAB function’ block, and you want to change the size and type of the input parameters without modifying the source file.
To change the input parameters without modifying source files, you can follow this:
Simulink Coder works almost like MATLAB coder just that it has been optimized to generate code from Simulink models, Simulink coder is often used to generate code for embedded systems, regarding dynamic libraries you can configure the build settings to output a dynamic library by using the ‘Interface’ tab under ‘code generation’.
Kindly refer to the documentations below for more information.
Model Explorer:
Generate C Code by Using Simulink Coder Quick Start Tool:
Hope this helps!
0 comentarios
Ver también
Categorías
Más información sobre Simulink Coder en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!