Within a single popup dialog box, how to request multiple user inputs to define variables?
13 ビュー (過去 30 日間)
古いコメントを表示
I have four separate boxes popup for a user to define variables r, s, n, and d:
r = str2double (inputdlg ('Input row number.')); % Row number.
s = str2double (inputdlg ('Input section number.')); % Section number.
n = str2double (inputdlg ('Input quantity of images.')); % Quantity of images.
d = str2double (inputdlg ('Input distance from vine [ft].')); % Camera distance from vine [ft].
Is there a way for the user to define these variables using one popup box? Thank you!
0 件のコメント
採用された回答
Mischa Kim
2014 年 1 月 31 日
Try
prompt = {'Input dialog'};
name = 'Input dialog';
numlines = 2;
dlg_ans = inputdlg(prompt, name, numlines);
then use
dlg_ans{1}(1,:)
dlg_ans{1}(2,:)
その他の回答 (1 件)
Walter Roberson
2014 年 1 月 31 日
Yes, inputdlg() accepts a cell array of strings for the several prompts.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Data Type Conversion についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!