matlabinputdlg⽤法,MATLAB中inputdlg的使⽤inputdlg
创建并打开输⼊对话框。
语法:answer = inputdlg(prompt)
prompt 包含对话框中输⼊框之上的提⽰台词的cell array。
eg:prompt = {'Enter matrix size:','Enter colormap name:'};
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是⼀个结构体,那么此结构体包含以下三个域:
input框禁止输入
Resize:Can be 'on' or 'off' (default). If 'on', the window is resizable horizontally.
WindowStyle:Can be either 'normal' or 'modal' (默认值,模式对话框,禁⽌其他输⼊).
Interpreter:Can be either 'none' (default) or 'tex'. If the value is 'tex', the prompt strings are rendered using LaTeX.

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。