Matlab App Designer: Update plot during loop in a function
19 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Nikolas Dehler
am 20 Dez. 2019
Kommentiert: Evgin Ün
am 6 Apr. 2020
The function I use is the callback function of a button. My issue is that when I execute a loop in the callback function, the plots in the UI Figure don´t update during the loop, but only show the last state after the loop is finished. I´d like to see the changing plot during the while loop in the UI Figure. Is this even possible, or do I have to add other functions, etc.?
0 Kommentare
Akzeptierte Antwort
Allen
am 20 Dez. 2019
Assuming that your plot function is part of the while loop and you have the hold off, then you might try using pause and/or drawnow.
while condition
...
plot( ... )
drawnow(axes_handle)
pause(0.5)
...
end
4 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Specifying Target for Graphics Output 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!