Hi!
I am developping a Simulink model calling another model which is composed of 12 "In" blocks and 4 "Out blocks".
One of the "In" block takes for input a matrix.
The called model calls this variable ("REEC") as such:
And my model calls this variable as such, also with an "In" port block and a Data Type Conversion, from double to single.:
I initialised my input variable "input_REEC" to be a 51x43 double matrix and added it to the input tab in Simulation > Model Configuration Parameters > Data Import/ Export
- If I run my simulation as such (input as double then converting it to single), I get the following error:
Invalid data type for root level port 'test_new_version_model_Switch/REEC' external data.
The root level input port is set to use data type 'single' but the external data is an array of type 'double'.
To load external data of non-double data type, change the external input to use structure format,
timeseries format, or disable loading of external input.
Loading of external inputs is disabled by going to the Simulation menu and selecting Configuration Parameters.
On the Data Import/Export page, locate the Load from workspace group and uncheck the Input checkbox.
2. If I run the simulation without the data type conversion (input as double and leaving it as such), I get the exact same error
Invalid data type for root level port 'test_new_version_model_Switch/REEC' external data.
The root level input port is set to use data type 'single' but the external data is an array of type 'double'.
To load external data of non-double data type, change the external input to use structure format,
timeseries format, or disable loading of external input.
Loading of external inputs is disabled by going to the Simulation menu and selecting Configuration Parameters.
On the Data Import/Export page, locate the Load from workspace group and uncheck the Input checkbox.
3. If I run the simulation with first transforming the input_REEC from double to single before starting the simulation (input_REEC = single(input_REEC), I get the error:
Unsupported input format. Available formats include: (1) a double non-complex matrix, (2) a structure with
or without time, (3) a MATLAB timeseries object, (4) a structure with MATLAB timeseries objects at all
leaves (for bus input), (5) a Simulink.Timeseries object, (6) a Simulink.TsArray object (for bus input).
All formats require the data to be finite (not Inf or NaN).
Would anybody know how to solve this by any chance?
Thank you very much!