How do I launch a matlab gui from the desktop?
149 visualizaciones (últimos 30 días)
I have a GUI that a I developed mygui.fig that calls mygui.m as per usual. I tried copying mygui.fig to the desktop to see if it would run that way, but it only brings up the figure and doesn't make the connection with the code in the .m file.
Is there a way, through matlab, that I can one click launch my gui from my desktop?
If not, I was considering writing a script to launch it but am not sure if there is a protocol to launch matlab then execute a command via an .exe
If anyone can help I'd be greatly appreciative.
Más respuestas (3)
Malcolm Lidierth el 12 de Feb. de 2013
One way might be to launch a Java executable and connect to the MATLAB engine using the Java Matlab Interface via matlabcontrol:
If your GUI were Java-based (as opposed to MATLAB/Java-based) you could choose another engine, e.g. SciLab, R etc.
Ryan Livingston el 12 de Feb. de 2013
Not too certain on the question. If you want to launch the GUI with a click (or two) from MATLAB just right-click the M file in the folder browser and pick "Run".
If you want to run the GUI by double-clicking something from the desktop (in Windows without MATLAB open) you can make a file "runGui.bat" which contains:
start matlab -r mygui
Then you can double-click that to launch MATLAB and open the GUI. Note that this assumes you have MATLAB on the system path and that "mygui.m" is in the same directory as "runGui.bat".