MATLAB中inputdlg的使用
生活随笔
收集整理的這篇文章主要介紹了
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是一個結構體,那么此結構體包含以下三個域:
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.
總結
以上是生活随笔為你收集整理的MATLAB中inputdlg的使用的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Mat, vectorpoint2f,P
- 下一篇: 双目相机的一个例子