zoukankan      html  css  js  c++  java
  • Matlab基本函数-menu函数

    1、menu函数:产生菜单

    2、用法说明

         m = menu('title','n1','n2',......,'nn') 函数显示以字符串变量‘title’为标题的菜单,选项为字符串变量:‘n1’,......,返回所输入的值到m

    3、举例说明

    >>  m = menu('登录注册界面','登录','注册','取消','返回')
    
    m =
    
         1
    
    >> m = menu('登录注册界面','登录','注册','取消','返回')
    
    m =
    
         2
    
    >>  m = menu('登录注册界面','登录','注册','取消','返回')
    
    m =
    
         3
    
    >>  m = menu('登录注册界面','登录','注册','取消','返回')
    
    m =
    
         4

    4、附录

    >> help menu
     menu   Generate a 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.
     
        On most graphics terminals menu will display the menu-items as push
        buttons in a figure window, otherwise they will be given as a numbered
        list in the command window (see example, below).
     
        Example:
            K = menu('Choose a color','Red','Blue','Green')
            %creates a figure with buttons labeled 'Red', 'Blue' and 'Green'
            %The button clicked by the user is returned as K (i.e. K = 2 
            implies that the user selected Blue).
     
        See also uicontrol, uimenu, guide.
    
        Reference page in Help browser
           doc menu
    


  • 相关阅读:
    trie树模型
    计算机网络概念
    [luogu]1042乒乓球 (模拟)
    [IPUOJ10705]最大连通块 (dfs)
    IPUOJ10701 有障碍的八皇后
    【紫书学习笔记】
    纪念正式写博客的第一天
    Bzoj 1997 [Hnoi2010]Planar题解
    Bzoj 1925 [Sdoi2010]地精部落 题解
    Bzoj 2839 集合计数 题解
  • 原文地址:https://www.cnblogs.com/hzcya1995/p/13315527.html
Copyright © 2011-2022 走看看