MATLAB: Can a Simulink function work with strings

fuctionMATLABsimulinkstring

Hi! I'm trying to pass a string from workspace to Simulink, in case that it is possible, can a Simulink Function work with string variables?

Best Answer

Hi Celia,
Unfortunately it is not possible for any Simulink block to accept a string variable. Simulink is used for generating numeric outputs for a model based on the numeric inputs of the model in the previous time step plus the time step size multiplied by the derivative of the model. Clearly, there is no way to perform arithmetic operations or take the derivative of a string variable.
Thanks,
David
Related Question