Calling a .m file based on user selection
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Matt
am 19 Okt. 2016
Kommentiert: Matt
am 21 Okt. 2016
Hi all,
I have a GUI with a dropdown menu that is populated by a number of .m files in a directory, in a folder in the program root folder. When the user makes a selection, it is stored as a variable, 'circ'.
I have been using the run command, to run this .m file, but I am wanting to compile the program, and have found (I think) that the run command/function is not compatible with compiling.
run(fullfile('D:\Dropbox\PROGRAM\Trx', circ))
How can I do this differently?
Ordinarily I would just call it e.g.
Trx1
But because I need it to be based on user selection I created a directory, and used the run function.
Thanks,
Matt
0 Kommentare
Akzeptierte Antwort
Walter Roberson
am 19 Okt. 2016
Compiled code can only invoke pre-compiled files, not user selected .m at run-time. Compiled code does not have a MATLAB interpreter.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu File Operations 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!