How to run Simulink Model File From Script file ?
Ältere Kommentare anzeigen
I have a GUI where I choose a file to be simulated using a browse Option(Push Button), Am not able to simulate the file which I choose using the codes but if I specifically write the code like sim ('test_new01') am able to simulate. But when its sim('filename') am not able to simulate the file (that line code because name changes every time I choose different model file)
Antworten (2)
KL
am 23 Mai 2017
save the return in a cell array and use it.
filename{1,1} = get(handles.edit1,'String');
sim(filename{1,1});
3 Kommentare
Nithesh Nayak
am 23 Mai 2017
KL
am 23 Mai 2017
in your case,
sim([pathname filename]);
Nithesh Nayak
am 24 Mai 2017
Nithesh Nayak
am 5 Jun. 2018
Bearbeitet: Nithesh Nayak
am 5 Jun. 2018
Kategorien
Mehr zu Model, Block, and Port Callbacks finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!