我想实现一个 gui 环境,当用户加载两个图像时,它会选择一个算术运算来应用于这两个图像。我被困在这个地方。告诉我我在“案例”值中使用什么代码来应用。
function pushbutton3_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton3 (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.popupmenu1,'String');
popupmenu4value = contents{get(handles.popupmenu1,'Value')};
% Hints: contents = cellstr(get(hObject,'String')) returns popupmenu1contents as cell array
% contents{get(hObject,'Value')} returns selected item from
popupmenu1
switch popupmenu4value
case 'Add'
%function of A
set(handles.figure1,'CurrentAxes',handles.axes3);
imshow(img2,[]);
case 'B'
%function of B
end