Variables scope in MatLab function block
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Tamim Boubou
am 22 Feb. 2021
Kommentiert: Tamim Boubou
am 25 Feb. 2021
Hello everyone,
I have a simulink file, in which I'm using a matlabFunction block, this function is calling several other functions and files including some structures in the same path, but whenever I run the simulation, the variables that are defined in the workSpace are not visible for the "matlab function" block, is there any way of changing their scope or any approach to fix this other than having to re-define all the variables locally within that block?
0 Kommentare
Akzeptierte Antwort
Fangjun Jiang
am 22 Feb. 2021
Use "Edit Data" in the MATLAB Function Editor to specify those base workspace variables as the parameters
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!