Simulink Coder and Variable dimension data

2 views (last 30 days)
Julien
Julien on 22 Oct 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.

Answers (0)

Community Treasure Hunt

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

Start Hunting!