我刚开始学习按钮,我被卡住了。我有两个弹出菜单。当用户选择按钮时。每个弹出菜单选择的总数返回给用户。我从弹出菜单中获得了值,但我不知道在执行按钮后如何返回它。任何帮助表示赞赏
function pushbutton1_Callback(hObject, eventdata, handles)
math=0;
data1 =get(handles.popupmenu1, 'Value') %processing data from first pop up menu
if data1== 1
math=1
elseif data1 == 2
math=4
end
data2=get(handles.popupmenu2, 'Value') %processing data from second pop up menu
if data2==1
math=math + 5;
end
% I tabulated math which is some number. I want to return it back to the user
in a text outside of the button.