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

Online Help

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_data0.5595371873412780.4538943025386420.884875385184700−0.4714903681570720.8389029078187190.4787722988486021.157902082619430.9648531907159080.6784179640720820.4944664212889270.2684350340055680.2331441814045780.7961879085760811.492333541869770.4178484400334050.4158688752542730.7994512485834260.9189902991795820.7477827426178090.5595947461678560.8456515648990740.4338559784366660.2141025905545510.6811319647174530.6411582723587600.9288535123912930.6474902506617090.5043108274126350.9827530477978290.6765821635087410.9524507828985360.5987918066401040.5135102804094571.113716906066290.6637887196861880.8287372676763040.9828061389103760.8033191354509450.8125066283808301.020236676992771.047557569923990.6732770324610201.325197511094860.6209651685680380.6704096894008561.582491657227870.5225858466123751.186895114183930.9282115932830960.6948168413356010.3696818197641370.6084289084328651.266110453279830.7820333574795311.024819391406510.9060860832633070.8805757416108780.9137552089298040.8285159060356581.339470295047041.250832962735471.183226624350230.9186525844724820.8378516601196341.161535313515191.201391442798061.376586128357661.335684371153831.022641727445971.306427003533561.136547269117141.335110044629031.378057704746461.881650551228900.8672180251437501.010455192297331.393984290873151.404326298418901.234234784598101.434497354682661.454662719312191.132271922944041.474937377043511.077176802614151.457820694449461.012662927878361.168768134936371.171751657331692.090125104727281.466201478690471.235893862220961.837566549830031.151982927428391.196375824492701.290014193597751.051059591779281.718974889485931.865054954656631.552648819618051.26345762952976

(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

 


Download Help Document