comet

Purpose

Animated comet plot.

Synopsis

comet(y)
comet(x,y)
comet(x,y,p)
comet

Description

A comet plot is an animated graph in which a circle (the comet head) traces the data points on the screen. A trailing segment, the comet body, follows the head. The tail traces the entire function using a solid line.

comet(y) displays an animated comet plot of the vector y.

comet(x,y) displays an animated comet plot of vector y versus vector x.

comet(x,y,p) uses a comet body of length p*length(y). The default value for p is 0.1.

comet, with no arguments, provides a demonstration of the comet plot.

Examples

t = 0:.01:2*pi;
x = cos(2*t).*(cos(t).^2);
y = sin(2*t).*(sin(t).^2);
comet(x,y)

See Also

comet3, quakedemo

(c) Copyright 1994 by The MathWorks, Inc.