From: Shaun on
Hi

I am running a simulink model which involves a referenced model within an enabled subsystem. I want to use a struct which lives in the base workspace as an argument for the referenced model. That is, i want to define a struct in the base workspace then import that as a parameter in the referenced model.

I update the referenced model to include the struct in the Model workspace, and declare the struct as a model argument so that it may be used when referencing the model.

I then insert the name of the workspace struct as a model argument value for the instance of the referenced model. All of this works fine

However, when i try to run the model, i get the error below:
"block diagram has a parameter argument 'h_data' but the corresponding parameter in the model's workspace is not valid. The value of this parameter must be numeric"

does this mean that i cannot use a struct as a model argument value (ie it has to be a single value), or am i not defining the struct properly in the model workspace? The user guide says that the values may be entered as literal values, variable names, MATLAB expressions and Simulink parameter objects, but im not sure what that means for data types.

I realise that was very confusing. Thanks muchly

Shaun