Global Index (all files) (short | long) | Local contents | Local Index (files in subdir) (short | long)
answer = menutext(HeaderText, varargin);
Generate a text menu of choices for user input. CHOICE = MENU(HEADER, ITEM1, ITEM2, ... ) displays the HEADER string followed in sequence by the menu-item strings: ITEM1, ITEM2, ... ITEMn. Returns the number of the selected menu-item as CHOICE, a scalar value. There is no limit to the number of menu items. CHOICE = MENU(HEADER, ITEMLIST) where ITEMLIST is a string cell array is also a valid syntax. The menu-items will be given as a numbered list in the command window. Example: >> K = MENUTEXT('Select food', 'sausage', 'appel', 'egg') displays on the screen: ----- Select food ----- 1) sausage 2) appel 3) egg Select a menu number: The number entered by the user in response to the prompt is returned as K (i.e. K = 3 implies that the user selected egg). See also: menu
This function calls | This function is called by |
---|---|