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

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

Aishwarya  D
Aishwarya D 2014년 4월 22일
편집: Aishwarya D 2014년 4월 22일
@ Akshata M It got executed.Thank you.
Its working but after pressing in the push button the figure will close immediately. any solution for this problem ?
Thank you, it works well.
thank u sur

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Swaraj Varma
Swaraj Varma 2017년 4월 22일

0 개 추천

file executed but workspace is blank help !!

카테고리

도움말 센터File Exchange에서 Environment and Settings에 대해 자세히 알아보기

질문:

2014년 4월 22일

댓글:

2022년 4월 30일

Community Treasure Hunt

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

Start Hunting!

Translated by