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

8 visualizzazioni (ultimi 30 giorni)
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)

Risposta accettata

Chandrasekhar
Chandrasekhar il 22 Apr 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 Commenti

Accedi per commentare.

Più risposte (1)

Swaraj Varma
Swaraj Varma il 22 Apr 2017
file executed but workspace is blank help !!

Categorie

Scopri di più su Migrate GUIDE Apps in Help Center e File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by