how to use the pop up menu in gui which contains "Yes" and "No", then linked to pushbutton
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Zuliana Nurfadlillah
el 29 de Dic. de 2019
Respondida: Zuliana Nurfadlillah
el 29 de Dic. de 2019
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
Respuestas (1)
Ver también
Categorías
Más información sobre Migrate GUIDE Apps en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!