The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....


Declaration:property PowerSpec[ix: integer]: double;

The readonly array property PowerSpec provides access to the one-sided (unscaled) power spectrum. The index ix may assume values between 0 and SpectrumSize div 2. Accessing any value of the array below 0 and above SpectrumSize div 2 will result in a zero value on read. PowerSpec[0] returns the constant coefficient a0, the first harmonic is returned in PowerSpec[1] and so on.

Hint: Please note the subtle realtionship between the PowerSpec and the Magnitude property. Since the power spectrum returns the one-sided spectrum (adding up both positive and negative frequencies) the relationship is

PowerSpec[i] := SpectrumSize * sqr(Magnitude[i]) / 2;

Note: Feeding very large numbers (> 10150) to the Fourier transformation routine may result in a floating point overflow when retrieving the power spectrum. These floating point limitations are not trapped by the component for efficiency reasons.

Example: This property is used in the following example program (see for downloading the code): fft

Last Update: 2012-Okt-20