I am looking for a way to create a persistent variable which dynamically derives its data type from the input Signal in an Embedded MATLAB function block. I know that it is possible to define inputs, parameters and outputs in the Embedded MATLAB function's 'Ports and Data Manager', however I don't know how to automatically set the data type of a variable.
MATLAB: How to dynamically define the data type of a persistent variable depending on the type of the input signal in an Embedded MATLAB function block in Simulink 7.6 (R2010b)
automatic;classdataembeddedMATLABsimulinktype
Best Answer