How can I let the surf function in matlab to wait for user prompt before showing up the figure.
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I am trying to plot an array using the surf function in matlab. Everytime I try to use this function, it spits all the figures at once. Is there a way that I can let the program wait each time to spit the next figure.
Thank you in advance any help would be appreciated.
2 Kommentare
Rik
am 27 Jan. 2019
What do you mean with 'all the figures'? The surf function only outputs a single plot, unless you call it repeatedly.
What is your context?
Akzeptierte Antwort
Rik
am 28 Jan. 2019
This code should solve it. Your second call to surf would replace the first, so I put in a call to subplot. You could also plot the two surfaces in the same axis by calling hold on after the first surf.
for m=1:13
figure
subplot(1,2,1)
surf(a{m});
subplot(1,2,2)
surf(b{m});
f=msgbox('Click OK to continue to next figure');
uiwait(f)
end
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Graphics Performance 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!