How to vary the number of fields in inputdlg dynamically?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Sarath S
el 6 de Jun. de 2020
Comentada: Ameer Hamza
el 6 de Jun. de 2020
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 comentarios
Respuesta aceptada
Ameer Hamza
el 6 de Jun. de 2020
Something like this
n = inputdlg('Number of Zones');
n = str2double(n{1});
prompts = compose('Zone %d', 1:n);
y = inputdlg(prompts)
2 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Startup and Shutdown en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!