Documentation of menutext


Global Index (all files) (short | long) | Local contents | Local Index (files in subdir) (short | long)


Function Synopsis

answer = menutext(HeaderText, varargin);

Help text

 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

Cross-Reference Information

This function calls This function is called by

GEATbx: Main page  Tutorial  Algorithms  M-functions  Parameter/Options  Example functions 

This document is part of version 3.3 of the GEATbx: Genetic and Evolutionary Algorithm Toolbox for use with Matlab - www.geatbx.com.
The Genetic and Evolutionary Algorithm Toolbox is not public domain.
© 1994-2000 Hartmut Pohlheim, All Rights Reserved, (support@geatbx.com).