how to use the pop up menu in gui which contains "Yes" and "No", then linked to pushbutton
조회 수: 3 (최근 30일)
이전 댓글 표시
function pushbutton_Callback(hObject, eventdata, handles)
% hObject handle to lanjut (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
a=readfis('coba2');
out=evalfis([handles.G01 handles.G02 handles.G03 handles.G04 handles.G05 handles.G06 handles.G07 handles.G08
handles.G09 handles.G10 handles.G11 handles.G12 handles.G13 handles.G14 handles.G15 handles.G16, a]);
set(handles.hasil,'string',out);
% --- Executes on selection change in popupmenuG01.
function popupmenu_Callback(hObject, eventdata, handles)
% hObject handle to popupmenu (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
contents = get(handles.popupmenu,'String');
popupmenuvalue = contents{get(handles.popupmenu,'Value')};
guidata(hObject, popupmenuvalue);
% Hints: contents = cellstr(get(hObject,'String')) returns popupmenuG01 contents as cell array
% contents{get(hObject,'Value')} returns selected item from popupmenuG01
% --- Executes during object creation, after setting all properties.
function popupmenuG01_CreateFcn(hObject, eventdata, handles)
% hObject handle to popupmenuG01 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: popupmenu controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
답변 (1개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Migrate GUIDE Apps에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!