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?
Mostrar comentarios más antiguos
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?
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Deployment, Integration, and Supported Hardware en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!