SignalPlot - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


SignalProcessing

  

SignalPlot

  

plot a signal

 

Calling Sequence

Parameters

Options

Description

Examples

Compatibility

Calling Sequence

SignalPlot(f)

Parameters

f

-

string, rtable, or list ; signals to be plotted

Options

• 

channel, column : posint, or list(posint) : channel or rtable column, or list of these

• 

compactplot : truefalse : indicates if multiple plots should be displayed in a compact form

• 

detrend : truefalse : indicates if the data should have any trend removed

• 

reduceplot : truefalse or posint : indicates that plot resolution is to be reduced

• 

samplerate : realcons : the sample rate

• 

timeunit : anything

Description

• 

The SignalPlot command plots one or more signals. The input f can be the name of a file containing an audio signal, an rtable, or a list. See AudioTools/Formats for information about the kinds of files accepted.

• 

If f is an m by n Matrix (or 2-dimensional Array), then it is assumed to contain n signals of length m. In this case, all signals are plotted and displayed in an array plot. Similarly, if f is an audio signal with multiple channels, then plots for all channels are produced.  If you do not wish to plot all signals, the channel and column options allow you to plot a subset.

• 

If f is a list, then every element of the list must be a single-channel audio signal or a 1-dimensional Array.

• 

The compactplot option allows multiple plots to be displayed more compactly. When this option is set to true, it is assumed the x-axis labels for all plots are identical and thus they are displayed for the bottommost plot only.

• 

The detrend option specifies if the data should have any linear trend removed before being plotted.

• 

If the signal is particularly large and the reduceplot option is set to true, then the plot resolution is automatically reduced for efficient rendering. If reduceplot is a positive integer, then the plot is reduced by that factor. The default setting for this option is true.

• 

The samplerate option is used to specify a sample rate. Note that audio signals generated by the AudioTools package have the sample rate saved in their attributes.

• 

The timeunit option is used to specify the unit time of the sample rate. The default value is s.

• 

Additional plotting options as described on the plot/options help page may be included.

Examples

withSignalProcessing:

audiofilecatkerneloptsdatadir,/audio/stereo.wav:

SignalPlotaudiofile,compactplot

Generate a random signal with an added trend.

signal_dataGenerateGaussian100,0.5,0.3+seqi,i=0.01..1,0.01

signal_data

(1)

Plot the signal and the trend line.

withStatistics:

plots:-displaySignalPlotsignal_data,legend=Data,plotLinearFita+bx,seq1..100,signal_data,x,x=1..100,color=Black,legend=Trend,linestyle=dash

Plot the signal, the detrended signal, the trend line and the mean of the detrended data.

plots:-displaySignalPlotsignal_data,legend=Original Data,plotLinearFita+bx,seq1..100,signal_data,x,x=1..100,color=Black,legend=Trend,linestyle=dash,SignalPlotsignal_data,detrend,color=Red,legend=Detrended Data,plotMeanDetrendsignal_data,x=1..100,color=Red,legend=Mean of Detrended Data,linestyle=dot

Compatibility

• 

The SignalProcessing[SignalPlot] command was introduced in Maple 18.

• 

For more information on Maple 18 changes, see Updates in Maple 18.

• 

The SignalProcessing[SignalPlot] command was updated in Maple 2019.

• 

The detrend option was introduced in Maple 2019.

• 

For more information on Maple 2019 changes, see Updates in Maple 2019.

See Also

AudioTools/Formats

LSPeriodogram

Periodogram

SignalProcessing

Spectrogram

Statistics:-Detrend