How can I use function handles in Simulink?
10 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Maximilian Schönau
am 2 Dez. 2020
Kommentiert: Maximilian Schönau
am 4 Dez. 2020
Hello,
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 :)
0 Kommentare
Akzeptierte Antwort
Simone Lagger
am 4 Dez. 2020
I had the same problem and I found this method using the symbolic math toolbox and Simulink Interpreted MATLAB Fcn block that works :
https://it.mathworks.com/matlabcentral/answers/578619-using-a-function_handle-variable-from-workspace-in-simulink
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Simulink Functions finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!