drawnow
Force pending graphics updates to display.
Syntax
Section titled “Syntax”drawnowDescription
Section titled “Description”Flushes the graphics queue — the chart is redrawn immediately. Useful in animation loops where you want each frame to render rather than batching them all to the end.
Examples
Section titled “Examples”for i = 1:100 plot(x, y(i,:)); drawnowend