プッシュボタンについて学び始めたばかりで、行き詰まっています。2 つのポップアップ メニューがあります。ユーザーがプッシュ ボタンを選択したとき。各ポップアップ メニュー選択の合計がユーザーに返されます。ポップアップ メニューから値を取得しましたが、プッシュ ボタンが実行された後に値を返す方法がわかりません。どんな助けでも大歓迎です
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.