How can I use function handles in Simulink?
3 views (last 30 days)
Maximilian Schönau on 2 Dec 2020
i found similar questions, but none did account for my problem in Simulink.
I have a function handle in my model workspace, and I want to use it as a function in the model.
How can I use the function handle in the model workspace, to compute an output by the given input?
The function in the workspace has this shape:
y = @ (t) f(t);
With f beeing a function a compute in a different script which could change.
Looking forward to any Help :)
Simone Lagger on 4 Dec 2020
I had the same problem and I found this method using the symbolic math toolbox and Simulink Interpreted MATLAB Fcn block that works :