How to not prevent the msgbox and inputdlg from popping out at a same time?
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Muhammad Aiman Al-Amin
el 15 de Abr. de 2023
Respondida: Dyuman Joshi
el 15 de Abr. de 2023
So apparently my currrent output is this, where the inputdlg straight up pop out a few seconds after the msgbox appeared.![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1357058/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1357058/image.png)
is there a way to make them pop out one by one, where after I answer each msgbox (by clicking 'ok'), the next msgbox pop out instead of all msgbox and inputdlg pop out at a same time?
Also is it possible for you to have an inputdlg that consist of a few line with only one user input line?
Instead of the normal one like this:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1357063/image.png)
I want it to be like this, where I have tried a few ways such as putting semicolon in inputdlg, try to merge msgbox and inpudlg as an array, but still did not work like the image below.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1357068/image.png)
Thank you in advance
0 comentarios
Respuesta aceptada
Dyuman Joshi
el 15 de Abr. de 2023
You can merge the text and input the string in inputdlg()
str = sprintf(['Please state your condition before taking the glucose reading. \nPress: \n "1" if you were fasting.'...
'\n "2" if you took the reading around 2 hours after meal.'])
n = inputdlg(str);
nnum = str2double(n);
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Startup and Shutdown en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!