12.07.2015 Views

MATLAB Function Reference (Volume 2: Graphics)

MATLAB Function Reference (Volume 2: Graphics)

MATLAB Function Reference (Volume 2: Graphics)

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

drawnowPurpose2drawnowComplete pending drawing eventsSyntaxDescriptionRemarksdrawnowdrawnow flushes the event queue and updates the figure window.Other events that cause <strong>MATLAB</strong> to flush the event queue and draw the figurewindows include:• Returning to the <strong>MATLAB</strong> prompt• A pause statement• A waitforbuttonpress statement• A waitfor statement• A getframe statement• A figure statementExamplesExecuting the statements,x = –pi:pi/20:pi;plot(x,cos(x))drawnowtitle('A Short Title')grid onas an M-file updates the current figure after executing the drawnow functionand after executing the final statement.See Alsowaitfor, pause, waitforbuttonpress2-128

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!