I am using an IF block and If-Action subsystems in my SIMULINK model that represents the following pseudocode:
if (u1 > 0) { body_1;}else if (u2 > 0){ body_2;}else { body_3;}
The variables 'u1' and 'u2' that I want to use are of data types 'double' and 'single' respectively. When I execute this model, I receive the following error:
Data type mismatch. Input port 2 expects a signal of data type 'double'. However, it is driven by a signal of data type 'single'.
This implies that the data types of the inputs to the IF block are determined based on the data type of he first input to the IF block.
I would like the inputs to have different data types.
Best Answer