My model contains a Discrete State-Space block for which some of the parameters, e.g., A, B, C, and D, are matrices containing zeros. When I build the model using Real-Time Workshop, the zeros are missing from the generated code. For example, I set the A parameter equal to [1 2; 0 4] in Simulink; however, the model_data.c file that Real-Time Workshop generates shows the parameter as { 1.0, 2.0, 4.0 }.
Because I might update this value directly in the C-file at a later time, I need to force Real-Time Workshop to preserve such zeros.
Best Answer