compute the power spectrum of an array of samples - Maple Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Science and Engineering : Signal Processing : Conversions : SignalProcessing/PowerSpectrum

SignalProcessing[PowerSpectrum] - compute the power spectrum of an array of samples

Calling Sequence

PowerSpectrum(A)

PowerSpectrum(Br, Bi)

Parameters

A

-

Array of complex numeric values; the signal

Br, Bi

-

Arrays of real numeric values corresponding to the real and imaginary parts of the signal

Description

• 

The PowerSpectrum(A) command computes the power spectrum of the Array A and returns the result in an Array of datatype float[8]. The power spectrum is the square of the magnitude.

• 

The PowerSpectrum(Br, Bi) command computes the same result as the PowerSpectrum(A) command, but the real and imaginary parts of the complex numbers are stored separately in the Arrays Br and Bi.

• 

Before the code performing the computation runs, the input Array(s) are converted to datatype complex[8] (for the calling sequence with A) or float[8] (for the calling sequence with Br and Bi) if they do not have this datatype already. For this reason, it is most efficient if the input Array(s) have this datatype beforehand.

• 

If the container=C option is provided, then the results are put into C and C is returned. With this option, no additional memory is allocated to store the result. The container must be an Array having datatype float[8] and the same size as A, Br or Bi.

Thread Safety

• 

The SignalProcessing[PowerSpectrum] command is thread-safe as of Maple 17.

• 

For more information on thread safety, see index/threadsafe.

Examples

withSignalProcessing:

a:=Array1.+I,2.3.I,4.,1.I,'datatype'='complex'8

a:=1.+1.I2.3.I4.+0.I0.1.I

(1)

PowerSpectruma

2.13.16.1.

(2)

c:=Array1..numelemsa,'datatype'='float'8:

PowerSpectruma,'container'=c

2.13.16.1.

(3)

c

2.13.16.1.

(4)

r:=Array1.,2.,4.,0.,'datatype'='float'8

r:=1.2.4.0.

(5)

i:=Array1.,3.,0.,1.,'datatype'='float'8

i:=1.3.0.1.

(6)

PowerSpectrumr,i

2.13.16.1.

(7)

PowerSpectrumr,i,'container'=c

2.13.16.1.

(8)

c

2.13.16.1.

(9)

See Also

SignalProcessing[Magnitude]


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam