questdlg box variable prompt
3 ビュー (過去 30 日間)
古いコメントを表示
Hello, is it possible to make the number of prompts variable? E.g.
a=4;
prompt={'1','2','3','4'} %input count depends on a.
title=('title');
v=questdlg(prompt, title, 1);
c(a,1)=str2num(v{1},v{2},v{3},v{4})
0 件のコメント
採用された回答
Walter Roberson
2012 年 4 月 28 日
prompt = cellstr(num2str((1:a).'));
Please note the .' of the 1:a vector: it is required in order to for num2str() to work properly for this situation.
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Dialog Boxes についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!