How to execute .m file by pressing Push button in the created GUI?

10 vues (au cours des 30 derniers jours)
Aishwarya  D
Aishwarya D le 22 Avr 2014
Commenté : sed banj le 30 Avr 2022
I have tried using run(.m). but it's not working.
function pushbutton2_Callback(hObject, eventdata, handles) % hObject handle to pushbutton2 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) run(tikhnovphh1)

Réponse acceptée

Chandrasekhar
Chandrasekhar le 22 Avr 2014
write only the file name instead of run(tikhnovphh1).
function pushbutton2_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton2 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
tikhnovphh1; %m file to be executed.
  4 commentaires
Othmane ELMOUATAMID
Othmane ELMOUATAMID le 18 Juil 2018
Modifié(e) : Othmane ELMOUATAMID le 18 Juil 2018
Thank you, it works well.
sed banj
sed banj le 30 Avr 2022
thank u sur

Connectez-vous pour commenter.

Plus de réponses (1)

Swaraj Varma
Swaraj Varma le 22 Avr 2017
file executed but workspace is blank help !!

Catégories

En savoir plus sur Migrate GUIDE Apps 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!

Translated by