SignalProcessing - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Science and Engineering : Signal Processing : Visualization : SignalProcessing/SignalPlot

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:-Format 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/option 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

0.5595371873413880.453894302538495050.88487538518470440.471490368157085170.83890290781876820.478772298848588351.15790208261944860.96485319071592040.67841796407215240.49446642128884220.268435034005548860.23314418140455570.79618790857608471.4923335418697850.417848440033374070.415868875254240.79945124858345230.91899029917963060.74778274261784650.55959474616776420.84565156489909470.433855978436622770.21410259055452240.68113196471744970.64115827235871930.92885351239135630.64749025066168820.50431082741258930.98275304779788520.6765821635087050.95245078289856750.59879180664005560.51351028040942951.1137169060663110.6637887196861090.8287372676762910.98280613891046760.80331913545088310.81250662838077291.02023667699286211.047557569924020.67327703246097341.32519751109488020.62096516856801920.67040968940084731.58249165722788840.52258584661234721.18689511418394080.92821159328308630.69481684133555310.36968181976412050.60842890843285441.26611045327986150.78203335747949921.02481939140649870.90608608326321070.8805757416108330.9137552089297640.8285159060356261.33947029504707071.2508329627355641.18322662435027180.91865258447245870.83785166011959981.16153531351528461.20139144279840361.37658612835770281.33568437115386441.0226417274459041.30642700353360231.1365472691170751.33511004462912331.3780577047464641.8816505512289270.86721802514372271.01045519229731481.3939842908732081.4043262984189641.23423478459805841.43449735468275241.45466271931223151.132271922943991.47493737704353031.07717680261410151.45782069444947651.01266292787832431.16876813493633041.17175165733165222.09012510472731.46620147869047021.2358938622209431.8375665498300591.15198292742835661.19637582449266921.29001419359773271.05105959177924341.71897488948594421.86505495465665971.55264881961806281.263457629529701

(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:-Format

LSPeriodogram

Periodogram

SignalProcessing

Spectrogram

Statistics:-Detrend