⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 txtmenu.htm

📁 matlab的FDC工具箱
💻 HTM
字号:
<!doctype html public "-//W3C//DTD HTML 3.2//EN">
<html>
  <head>
    <link rel="stylesheet" type="text/css" href="fdchelp.css">
    <title>
      FDC help: TXTMENU
    </title>
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
  </head>
  <body bgcolor="#DDDDDD"><div>
    <h2>
      Text menu utility <i>TXTMENU</i>
    </h2>
    <p><i>TXTMENU</i> can be used to generate a text-menu of choices for user input in the Matlab command window. The function mimics the behavior of the <i>MENU</i> command from older Matlab versions, which did not yet provide support for graphical user-interfaces. Compared to the current version of the <i>MENU</i> command, <i>TXTMENU</i> differs in that it will always use the command-window regardless of the graphical capabilities of the workstation.</p> 
    
    <h3>Usage</h3>
    <p><code>CHOICE = txtmenu(HEADER, ITEM1, ITEM2, ... )</code><br> displays the <i>HEADER</i> string followed in sequence by the menu-item strings: <i>ITEM1</i>, <i>ITEM2</i>, ..., <i>ITEMn</i>. The number of the selected menu-item will be returned into the scalar variable <i>CHOICE</i>. There is no upper limit to the total number of menu items.</p>
    <p><code>CHOICE = txtmenu(HEADER, ITEMLIST)</code><br> where ITEMLIST is a string cell array is also a valid syntax.</p>
    
    <h3>Example</h3>
    <p><code>K = txtmenu('Choose a color','Red','Blue','Green')</code><br>
    will display:</p>
    <pre>
     
          Choose a color:
     
             1) Red
             2) Blue
             3) Green
     
          Select a menu number:
     </pre>
     <p>on the screen. The number entered by the user in response to the prompt is returned to the variable <i>K</i> (e.g. <i>K</i>&nbsp;=&nbsp;2 implies that the user selected Blue from this example menu).</p>
  </div></body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -