- Control Memory Allocation - https://www.mathworks.com/help/simulink/ug/control-memory-allocation-for-variable-size-arrays-in-a-matlab-function-block.html
- Code generation for variable sized-arrays - https://www.mathworks.com/help/simulink/ug/what-is-variable-size-data.html
Setting Maximum Array Size Threshold in Simulink Model for Embedded C Code Generation
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Francesco Bellucci
am 22 Apr. 2024
Beantwortet: Paras Gupta
am 6 Mai 2024
Hi,
I am trying to understand how to set maximum size arrays threshold in case of a Simulink model that needs to use Matlab functions that support variable size arrays.
Is "Maximum stack size (bytes)" the proper parameter to set? I am asking this since I have to generate a C code for my model for an embedded application and I need to be sure to set an upper threshold for all the variables inside my model.
0 Kommentare
Akzeptierte Antwort
Paras Gupta
am 6 Mai 2024
Hi Francesco,
I understand that you want to set an upper threshold on the size of the code generated for all the variable-sized arrays in a MATLAB Function Block in Simulink.
Instead of using the "Maximum stack size (bytes)" parameter, you can control the use of dynamic memory allocation for the variable-sized arrays. Please refer to the following documentations for more information on the same:
Hope this helps.
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Simulink Coder finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!