- 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 (최근 30일)
이전 댓글 표시
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
답변 (1개)
Jatin
2024년 9월 2일
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
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!