MATLAB: Do I get the error “Invalid setting in ‘/‘ for parameter ‘‘.” when using a character array (or struct that contains a character array) as a block’s value

simulink

Why do I get the error "Invalid setting in '<model>/<block>' for parameter '<param>'." when using a character array (or struct that contains a character array) as a block's value?

Best Answer

The character type is not supported by Simulink: Supported Data Types.
Consider converting to an integer type, or using Simulink Strings (introduced in MATLAB R2018a).