function [out1,out2]=menu
f = figure('Position',[350 350 500 300]);
x = uicontrol('Style', 'edit',...
'String', {''},...
'Position', [100 250 100 50]);
y = uicontrol('Style', 'popup',...
'String', {'A','B'},...
'Position', [100 170 100 50]);
z = uicontrol('Style', 'pushbutton',...
'String', {'OK'},...
'Position', [100 100 100 50],...
'Callback', 'uiresume(gcbf)');
uiwait(f)
out1_str=get(x,'String');
out1 = str2double(out1_str{1});
out2_n=get(y,'Value');
out2_string = get(y,'String');
out2 = out2_string{out2_n};
close(f)
end
0 Comments
Sign in to comment.