필터 지우기
필터 지우기

How to display enter screen by GUIDE

조회 수: 1 (최근 30일)
Binh Huynh Thanh
Binh Huynh Thanh 2019년 5월 15일
댓글: Binh Huynh Thanh 2019년 5월 20일
Hello EveryOne,
I am making the tool by GUIDE.
I created the GUIDE as below picture:
tool.PNG
And my expected is
1/ Once click into the button "CREATE_FILES"
|_ _ The display enter screen will be appeared and I can enter the argument into that
*****For example *****
I have a function with 1 argument as below :
function create_sample(value)
expectedvalue = value;
end
And callback function is
function CREATE_FILES_Callback(hObject, eventdata, handles)
% hObject handle to CREATE_FILES (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
value = eventdata
create_sample(value)
|_ _ _ So, the value can be took by the data which is entered in the display enter screen
|_ _ _ In this case eventdata is the value which I entered at the display enter screen
Thank you in advance
  댓글 수: 2
Dennis
Dennis 2019년 5월 15일
I am not sure if i understand your question correctly.
I think eventdata is something completly different from what you expect it to be.
A tiny example of what i think you are trying to do (i did not use guide, therefore the handles argument is missing)
uicontrol('style','pushbutton','callback',{@MyFcn_Callback});
function MyFcn_Callback(~,~)
Mydata=inputdlg('Input please','s');
%now do something with it
%or store it setappdata/getappdata or guidata
end
Binh Huynh Thanh
Binh Huynh Thanh 2019년 5월 20일
Hello Dennis,
Yeah, you gave me the good example.
It's my expectation.
Thank you very much.

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Migrate GUIDE Apps에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by