Why is my 2-D array data flattened in code generation from my Simulink model using Embedded Coder but not when I use a Stateflow chart?
显示 更早的评论
I am generating code for my model. When generating code normally, my 2-D array or matrix is flattened as shown below:
var1 = ((&my2DArray[0][0]))[4];
However, when my signals, which are handling the 2-D matrix data, are passed through a Stateflow chart in my model first, the data is represented as a 2-D array even in my generated C-code, as shown below:
var1 = my2DArray[1][2];
Why is my code generated with single indexing for matrices and 2-D arrays, but not when using a Stateflow?
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 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!