Variable Length inputdlg() Box

1 view (last 30 days)
Brad
Brad on 23 Jun 2012
The inputdlg allows me to type in multiple prompts thus generating multiple input boxes. However, I'd like to have a have a user specifiy the number of inputs (say 5) and then have the inputdlg box pop up with 5 input boxes each with a prompt that says "Input 1", "Input 2",...etc. Any idea how to go about this?

Accepted Answer

Walter Roberson
Walter Roberson on 23 Jun 2012
answers = inputdlg( cellstr( num2str((1:N).', 'Input %d') ) );

More Answers (0)

Categories

Find more on Startup and Shutdown in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!