MATLAB中inputdlg的使用

来源:互联网 发布:淘宝美工和室内设计 编辑:程序博客网 时间:2024/04/20 07:36
原文地址:MATLAB中inputdlg的使用作者:何勍
inputdlg

创建并打开输入对话框。

语法:answer = inputdlg(prompt)
prompt 包含对话框中输入框之上的提示台词的
cell array
eg:prompt = {'Enter matrix size:','Enter colormapname:'};
answer 返回包含每个输入框的结果的一个cell array。
eg:answer = {'1','2'};
answer = inputdlg(prompt,dlg_title)
dlg_title对话框的标题。
answer =inputdlg(prompt,dlg_title,num_lines)
num_lines对话框中输入框的行数。
answer =inputdlg(prompt,dlg_title,num_lines,defAns)
defAns对话框中默认显示的数据,cell 类型。
eg:defAns = {'20','hsv'};
answer =inputdlg(prompt,dlg_title,num_lines,defAns,options)
options对话框的一些属性的设置,包括:
如果options是一个字符串‘on',那对话框横向的大小可变。
如果options是一个结构体,那么此结构体包含以下三个域:
Resize:Can be'on' or 'off' (default). If 'on', the window is resizablehorizontally.
WindowStyle:Can be either 'normal' or 'modal'(默认值,模式对话框,禁止其他输入).
Interpreter:Can be either 'none' (default) or 'tex'. If the valueis 'tex', the prompt strings are rendered using LaTeX.
0 0
原创粉丝点击