Can i use the same MATLAB function in Simulink multiple times?
13 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Daniel Metzler
am 6 Dez. 2018
Beantwortet: Fangjun Jiang
am 6 Dez. 2018
In Simulink I have a MATLAB function defined which I need at multiple calculation steps so I just copied the entire MATLAB function block.
Can I define the function in a separate .m-file so that if I update the function, every instance of it automatically uses the updated version? If so, how can I implement this?
0 Kommentare
Akzeptierte Antwort
Fangjun Jiang
am 6 Dez. 2018
I would assume so. Just create that function and save it in your MATLAB path and then call it in your MATLAB Function block. You may also consider using the "Fcn" block or "Interpreted MATLAB Function" block.
0 Kommentare
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!