How to increase the number of input options in dialog box?

1 view (last 30 days)
How to increase number of input options or lines in dialog box?
eg: if the number of elements is 2 then it should ask
enter length
length 1 __
length 2 __
and if the number of elements is 3 it should ask
enter length
length 1 __
length 2 __
length 3 __
(ei the number of input length lines should increase with respect to the number of elements)

Answers (1)

Geoff Hayes
Geoff Hayes on 30 Jan 2019
Jijo - from inputdlg couldn't you do something like
N = 3;
prompts = {};
for k = 1:N
prompts = [prompts sprintf('length %d',k)];
end
results = inputdlg(prompts,'enter length');

Tags

Community Treasure Hunt

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

Start Hunting!