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.

cometPurpose2cometTwo-dimensional comet plotSyntaxDescriptioncomet(y)comet(x,y)comet(x,y,p)A comet plot is an animated graph in which a circle (the comet head) traces thedata points on the screen. The comet body is a trailing segment that follows thehead. The tail is a solid line that traces the entire function.comet(y) displays a comet plot of the vector y.comet(x,y) displays a comet plot of vector y versus vector x.comet(x,y,p) specifies a comet body of length p*length(y). p defaults to 0.1.RemarksExamplesNote that the trace left by comet is created by using an EraseMode of none,which means you cannot print the plot (you get only the comet head) and itdisappears if you cause a redraw (e.g., by resizing the window).Create a simple comet plot:t = 0:.01:2*pi;x = cos(2∗t).*(cos(t).^2);y = sin(2∗t).*(sin(t).^2);comet(x,y);See Alsocomet32-91

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

Saved successfully!

Ooh no, something went wrong!