I've trained a classification model (Classification Tree) using Matlab's Classification Learner App. I've exported it to the workspace and also saved it as a .mat file.
I need to embed it in a Simulink model to make predictions at every time step during simulation. I've tried using a Matlab Function block and using "load" to load the classification tree from the .mat file and then using mdl.predictFcn(myInputData) to make a prediction on new data. However, when I try to run the simulink model I get the error:
Found unsupported class for variable using function 'load'. MATLAB class 'function_handle' found at 'mdl.ClassifierTTC.predictFcn' is unsupported.
Does this mean I cannot use my classification model in Simulink? Has anybody tried to do something like this already?
Thanks in advance.
MATLAB Function
, but you can use anInterpreted MATLAB Function
or an m-codeS-Function
. – Phil Goddard