Dew MtxVec NET
TVec.IFFTToReal Methods
Summary
The inverse FFT from complex to real.

Class
TVec

Declaration
Function IFFTToReal(Vec: TVec; NoScale: boolean = False): TVec;

Description
Calculate the inverse FFT from all Vec elements and store the results in the calling vector. Vec Length must not be the power of two. Length and Complex properties of the calling vector are set implicitly the size and type of the result.
Declaration
Function IFFTToReal(NoScale: boolean = False): TVec;

Description
Calculates the inverse Fast Fourier Transformation (FFT) from complex to real from all calling vector elements. The result is a real type vector. Input vector must be a complex vector or an exception is raised. If the NoScale parameter is true then no scaling is performed for the calling vector. The results can be erroneous if overflow or underflow occurs. In-place fsfCCS complication

When TDenseMtxVec.FFTStorageFormat is equal to fsfCCS the Length of the result will be equal to Length-2, because the source data is bigger than the result data by 2 real samples, if TDenseMtxVec.FFTOddLength is false. If FFTOddLength is True the result will fill up Length-1 samples.

 See Also 
FFTFromReal 
TDenseMtxVec.FFTFromReal 
IFFT 
TDenseMtxVec.FFT 

Example 1

var a,b: TVec; begin CreateIt(a,b); try //Even a.SetIt(True,[1,2,3,4]); b.FFTFromReal(a); // b = [(10, 0),( -2,2), (-2, 0)] b.IFFTToReal; // b = [1, 2, 3, 4, -2, 0)] //Odd length a.SetIt(True,[1,2,3,0]); b.FFTOddLength := True; //use only Length-1 samples b.FFTFromReal(a); // b = [(6,0),( -1.5,0.8660)] //result requires 2 complex (= 4 real numbers) b.IFFTToReal; //b = [1, 2, 3, 0.8660] //Event length a.SetIt(True,[1,2,3,4, 0,0]); //allocate two more elements a.FFTOddLength := false; //use only Length-2 samples a.FFTFromReal; // a = [(10, 0),( -2,2), (-2, 0)] //result requires 3 complex (= 6 real numbers) a.IFFToReal; // a = [1, 2, 3, 4, -2, 0)] finally FreeIt(a,b); end; end;

Copyright 2008 Dew Research
http://www.dewresearch.com