How to vary the number of fields in inputdlg dynamically?
7 次查看(过去 30 天)
显示 更早的评论
Im trying to get values for n number of fields where n is specified by the user previously.
For example.
After this, depending upon the value user enters, lets say 5, I need another dialog box to gather 5 values.
The next dialog box should look soemthing like this:
Enter thickness of growth
Zone 1:
Zone 2:
Zone 3:
Zone 4:
Zone 5:
0 个评论
采纳的回答
Ameer Hamza
2020-6-6
Something like this
n = inputdlg('Number of Zones');
n = str2double(n{1});
prompts = compose('Zone %d', 1:n);
y = inputdlg(prompts)
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Startup and Shutdown 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!