make dialogue box wait for previous figure to be closed
6 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I = imread('END_OF_YEAR Gameboard.jpg');
imshow(I);
% question 1
% generate a random integer value for x between 1 and 100
x = randi([1 100]);
% asks a question and waits for user input
prompt1= 'x+4';
ans1 = inputdlg(sprintf("when x = %i \nWhat is x+4?",x));
% i would like for the dialogue box to wait for the image to be closed before appearing, thank you!
0 Kommentare
Akzeptierte Antwort
Voss
am 4 Mai 2022
I = imread('END_OF_YEAR Gameboard.jpg');
f = figure();
imshow(I);
uiwait(f); % wait for the image to be closed before proceeding
% question 1
% generate a random integer value for x between 1 and 100
x = randi([1 100]);
% asks a question and waits for user input
prompt1= 'x+4';
ans1 = inputdlg(sprintf("when x = %i \nWhat is %s?",x,prompt1));
2 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Startup and Shutdown finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!