MATLAB: How to use structures as input arguments for reference models in Simulink

argumentmodelparameterreferencesimulinkstructure

When I use a structure as an input argument for a reference model in Simulink, I get the following error:
Block diagram 'my_ref_model' has a parameter argument 'myDataStruct' but the corresponding parameter in the model's workspace is not valid. The value of this parameter must be numeric.

Best Answer

This enhancement has been incorporated in Release 2009b (R2009b). For previous product releases, read below for any possible workarounds:
The ability to use structures as arguments for reference models is not available in Simulink.
To work around this issue, enter the individual structure elements as input arguments and create associated numeric variables in the reference model workspace to store the parameters.