Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

Question about using MATLAB GUIDE functions

조회 수: 1 (최근 30일)
Arvind Mahendran
Arvind Mahendran 2012년 3월 27일
마감: MATLAB Answer Bot 2021년 8월 20일
Hi everyone, i basically want to create a user interface using GUIDE, and specifically i want to have a execute button which will then run my code i have written.
My code is a bit long but basically i draw data from .DAT files in my directory and use them to plot a optically plot. If i have to code written how would i got about linking this to a button

답변 (1개)

Stephen
Stephen 2012년 3월 28일
You need to add the code into the callback for pressing the button. Assuming you have one button and haven't renamed the tags, you need to find this snippet of code:
% --- Executes on button press in pushbutton1.
function pushbutton1_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
You'll probably need to reformat your code to address desired variable with the handles structure as opposed to your current method. Good Luck
Stephen

이 질문은 마감되었습니다.

태그

Community Treasure Hunt

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

Start Hunting!

Translated by