How can i make GUI pushback button call my App created in app designer?
7 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
How can i set up my GUI pushback button to call my application created in app designer (XXX.mlapp)?
I am trying to use a push button to call my app and i cant seem to get it to work.
% --- Executes on button press in pushbutton1.
function pushbutton1_Callback(hObject, eventdata, handles)
?????????
If someone can show the exact code to call the application that i would be great. I have read mutiple threads and have been getting nothing but errors.
1 commentaire
Adam
le 10 Avr 2019
You should be able to run it just using its name, the same as you would from command line
Réponses (1)
Agnish Dutta
le 10 Avr 2019
I recommend using MATLAB appdesigner to create GUIs with interactivity.
The first thing to do would be to include the target application in the MATLAB path.
You can execute any application on the MATLAB search path using the "!" expression before its name. Check the first answer to the question on the MATLAB answers page below:
Next create a GUI using MATLAB appdesigner and drag and drop a "button" element on the canvas. Add a callback function to the button element's on press event and include the command "!<name of application>" in it. This will open the application every time you press the "button" element. Refer to the following documents for more information.
Create and Run a Simple App Using App Designer - https://www.mathworks.com/help/matlab/creating_guis/create-a-simple-app-or-gui-using-app-designer.html
Write Callbacks in App Designer - https://www.mathworks.com/help/matlab/creating_guis/write-callbacks-for-gui-in-app-designer.html
0 commentaires
Voir également
Catégories
En savoir plus sur Develop Apps Using App Designer dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!