Define array to be code generated as static
2 次查看(过去 30 天)
显示 更早的评论
Hello!
I'm using Matlab Embedded Coder to generate C code from my matlab function. I have a matrix which I want to be declared as static in the resulting C code (due to memory allocation issues, out of my control). Is there a way in the Matlab code to make sure that Embedded Coder generates this particular matrix as a static array? I've tried creating it as a persistent variable in Matlab but Embedded Coder seems to just ignore that.
0 个评论
回答(1 个)
Darshan Ramakant Bhat
2021-5-18
Please refer the below documentation on stack space usage and dynamic memory allocation :
Hope this will help you.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Deployment, Integration, and Supported Hardware 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!