MATLAB Functions | Help Desk |
comet
Two-dimensional comet plotcomet comet(y) comet(x,y) comet(x,y,p)A comet plot is an animated graph in which a circle (the comet head) traces the data points on the screen. The comet body is a trailing segment that follows the head. The tail is a solid line that traces the entire function.
comet
demonstrates the comet plot.
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
.
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);
comet3