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

4 次查看(过去 30 天)
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)

采纳的回答

Chandrasekhar
Chandrasekhar 2014-4-22
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 个评论

请先登录,再进行评论。

更多回答(1 个)

Swaraj Varma
Swaraj Varma 2017-4-22
file executed but workspace is blank help !!

类别

Help CenterFile Exchange 中查找有关 Dialog Boxes 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by