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: FData: array of double;

For high speed data processing, the mechanism of feeding data to the FFT algorithm by means of the properties RealSpec and ImagSpec may be too slow. The public open array FData provides a way for direct access to the internal data buffer which is an array of double precision values (index 0..2*SpectrumSize-1).

The buffer array contains the data (or Fourier coefficients) in alternating order, with the values of the real part at even indexes and the imaginary values at odd addresses.

Attention: Manipulating the data buffer directly is potentially dangerous and may lead to program crashes if not done properly. It is recommended not to use this field unless there is a real need for it.

Example: Below is a sample code showing how to use the FData field. Please note, that the data buffer may be filled by block move commands, or DMA (direct memory access) routines in order to get maximum speed (not shown here).

  SpecSize = 256;

FFT.SpectrumSize := SpecSize;
for i:=1 to SpecSize do                 { load a square wave }
  if i <= (SpecSize div 2)                { the real part }
    then FFT.FData[2*i-2] := 0
    else FFT.FData[2*i-2] := 1;
  FFT.FData[2*i-1] := 0;           { the imaginary part }

Last Update: 2012-Okt-20