DiscretePlot - Maple Help

DynamicSystems

 DiscretePlot
 plot a vector of discrete points

 Calling Sequence DiscretePlot(T, A, opts) DiscretePlot(A, t0, Ts, opts)

Parameters

 T - Vector(realcons) or list(realcons); list of time values A - Vector(realcons) or list(realcons); list of amplitude values t0 - realcons; delay to the first point Ts - realcons; sampling time opts - (optional) equation(s) of the form option = value; specify options for the DiscretePlot command

Options

 • style = identical( line, point, stair, stem )
 Specify the plot style. The default is line. The line style connects each point directly to its neighbors with straight segments. The point style plots each point as a symbol. The stair style connects each point to its neighbors with segments parallel to the axes (stair steps). The stem style connects each point to the baseline with a vertical line segment (stem).
 • baseline = realcons

Used with the stem option to specify the baseline from which the stems are drawn. The default is 0.

Description

 • The DiscretePlot command plots a Vector or list of discrete points.
 • The points can be passed in two ways: (1) as two Vectors (or lists), the first the time values, the second the amplitude values; or (2) as a Vector (or list) of amplitudes followed by the initial delay and sample period.
 • The parameter T specifies the time values for the points to be plotted.
 • The parameter A specifies the amplitude values for the points to be plotted.
 • The parameters t0 and Ts specify the initial delay and the sampling time, respectively.
 • The DiscretePlot command takes all standard plot,options. The option style has been extended; see below for details.

Examples

 > $\mathrm{with}\left(\mathrm{DynamicSystems}\right):$
 > $\mathrm{Ns}≔30:$
 > $T≔\mathrm{Vector}\left(\mathrm{Ns},t↦0.1\cdot t\right):$
 > $A≔\mathrm{Vector}\left(\mathrm{Ns},t↦\mathrm{sin}\left(0.1\cdot 2\cdot t\right)\right):$
 > $\mathrm{DiscretePlot}\left(T,A,\mathrm{style}=\mathrm{stair},\mathrm{legend}="stair",\mathrm{color}=\mathrm{red},\mathrm{labels}=\left["time","signal"\right]\right)$
 > $\mathrm{DiscretePlot}\left(T,A,\mathrm{style}=\mathrm{line},\mathrm{legend}="line"\right)$
 > $\mathrm{DiscretePlot}\left(T,A,\mathrm{style}=\mathrm{point},\mathrm{legend}="point",\mathrm{symbol}=\mathrm{box}\right)$

The command to create the plot from the Plotting Guide is

 > $\mathrm{DiscretePlot}\left(T,A,\mathrm{style}=\mathrm{stem}\right)$