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.55953718734127790.453894302538642050.88487538518469990.471490368157071850.83890290781871950.478772298848602061.15790208261943040.96485319071590850.67841796407208180.49446642128892660.26843503400556830.23314418140457770.79618790857608131.49233354186976760.417848440033405040.415868875254272630.79945124858342560.91899029917958150.74778274261780850.55959474616785640.84565156489907410.433855978436666070.214102590554551410.6811319647174530.64115827235876010.92885351239129290.64749025066170860.50431082741263520.98275304779782950.67658216350874080.95245078289853620.59879180664010410.51351028040945691.11371690606628730.66378871968618810.82873726767630430.98280613891037570.80331913545094550.81250662838083041.0202366769927731.04755756992399380.67327703246102021.32519751109485680.6209651685680380.67040968940085631.58249165722786820.52258584661237511.1868951141839280.92821159328309590.69481684133560080.369681819764137170.6084289084328651.26611045327983220.78203335747953131.02481939140651420.90608608326330680.88057574161087830.91375520892980380.82851590603565761.33947029504704181.25083296273547441.18322662435023140.91865258447248220.83785166011963351.16153531351518981.20139144279806361.37658612835765611.3356843711538291.02264172744596871.30642700353356121.1365472691171351.33511004462902961.37805770474645861.88165055122890480.86721802514375051.01045519229733281.3939842908731471.40432629841890271.23423478459809831.4344973546826561.45466271931219241.13227192294404061.4749373770435061.07717680261414571.4578206944494641.01266292787836431.16876813493636681.171751657331692.0901251047272791.4662014786904681.23589386222095591.83756654983002841.15198292742838751.19637582449269631.29001419359774541.05105959177927551.71897488948592621.8650549546566321.5526488196180471.2634576295297608

(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