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!