I have a simulink model using matlab function blocks.
When i try to generate the C code from my model, the structures parameter scopes i used to represent my data are unused : When i say unused i mean, matlab coder creates a header file with all my structures defined. but in the actual algorithms, when the structure should be sent as argument to a function, matlab coder just defines new variables for each of the fields of which values are hardcoded.
So something like : Function(parameter); with parameter contraining X = 5 and Y = 8 becomes Function(5,8); once generated (so the function definition creating new variables for each of the fields).
You can imagine how messy that gets once the structures get too big.
A friend of mine told me objects dont work with matlab coder. So replacing my structs with objects is not an option unless my friend was wrong.
Does anyone know how i could force matlab coder to actually use the structures i defined for him? Or maybe there is another solution that i did not think of?
Thanks!