Simulink Coder and Variable dimension data

2 visualizaciones (últimos 30 días)
Julien
Julien el 22 de Oct. de 2013
Hello,
My simulink model is using data from Matlab Workspace (direclty, not in a FromWorkspace block). I would like to compile this model using Simulink coder. I can compile only in C, not in C++, because i'm using C coded blocks.
I managed to compile it, however, the data dimension is hard coded. For my usage, the data size can change (for example: [5 5 5 5] becomes [6 8 4 97] according to the chosen parameter).
When I use Simulink.Parameter (with ImportExtern, because ImportExternPointer leads to compilation errors) to define my values, the dimension stays hard coded. When I use the inline parameter and tunable parameter, it is not hard coded but it seems really tricky to use.
I read the documentation about inline and tunable parameters but its stays unclear to me. Can you help me on this topic? Also, Is it possible to do such an operation only in C?
Thank you.

Respuestas (0)

Categorías

Más información sobre Simulink Coder en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by