k = menu('mtitle','opt1','opt2',...,'optn')
menu('mtitle','opt1','opt2',...,'optn')
displays the menu whose title is in the string variable 'mtitle'
and whose choices are string variables 'opt1'
, 'opt2'
, and so on. menu
returns the value you entered.
k = menu('Choose a color','Red','Green','Blue')
displays
After you input a number, use---- Choose a color ----
1) Red
2) Green
3) Blue
Select a menu number:
k
to control the color of a graph.
Computers that employ a window system use a bitmapped menu.color = ['r','g','b']
plot(t,s,color(k))
demo
,input
,uicontrol
(c) Copyright 1994 by The MathWorks, Inc.