DynamicSystems
DiscretePlot
plot a vector of discrete points
Calling Sequence
Parameters
Options
Description
Examples
DiscretePlot(T, A, opts)
DiscretePlot(A, t0, Ts, opts)
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
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.
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 the Options section for details.
with⁡DynamicSystems:
Ns≔30:
T≔Vector⁡Ns,t↦0.1⋅t:
A≔Vector⁡Ns,t↦sin⁡0.1⋅2⋅t:
DiscretePlot⁡T,A,style=stair,legend=stair,color=red,labels=time,signal
DiscretePlot⁡T,A,style=line,legend=line
DiscretePlot⁡T,A,style=point,legend=point,symbol=box
The command to create the plot from the Plotting Guide is
DiscretePlot⁡T,A,style=stem
See Also
plot[options]
Download Help Document