필터 지우기
필터 지우기

How to give input to variables in m-file from GUI

조회 수: 1 (최근 30일)
KALYAN KUMAR
KALYAN KUMAR 2015년 7월 1일
As i need to give inputs from GUI to m-file. I have 3 variables out of which 2 are integers and one variable will accept data input of type alpha numeric. i need to use push button to execute the code in mfile. i can do that using run(name.m). but i cant able to give input to m-file using GUI. Can any one resolve this problem. Thanks in advance
sample code used
function popupmenu8_Callback(hObject, eventdata, handles) % hObject handle to popupmenu8 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) handles = guidata(hObject); % Update! contents = get(handles.popupmenu8,'Value') switch contents case 1
S.M=7;
S.P=20;
case 2
S.M=5;
S.P=30;
otherwise
end

답변 (0개)

카테고리

Help CenterFile Exchange에서 App Building에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by