MF_Cols_FFT MD_Cols_FFT ME_Cols_FFT
MF_Cols_FFTtoC MD_Cols_FFTtoC ME_Cols_FFTtoC
MCF_Cols_FFT MCD_Cols_FFT MCE_Cols_FFT
FunctionFast Fourier Transform along the columns
Syntax C/C++#include <MFstd.h>
void MF_Cols_FFT( fMatrix Y, fMatrix X, ui ht, ui len, int dir );
void MCF_Cols_FFT( cfMatrix Y, cfMatrix X, ui ht, ui len, int dir );
void MF_Cols_FFTtoC( cfMatrix Y, fMatrix X, ui ht, ui len );
C++ MatObj#include <OptiVec.h>
void matrix<T>::Cols_FFT( const matrix<T>& MX, int dir );
void matrix<complex<T> >::Cols_FFT( const matrix<complex<T> >& MX, int dir );
void matrix<complex<T> >::Cols_FFTtoC( const matrix<T>& MX );
Pascal/Delphiuses MFstd;
procedure MF_Cols_FFT( MY, MX:fMatrix; ht, len:UIntSize; dir:Integer );
procedure MCF_Cols_FFT( MY, MX:cfMatrix; ht, len:UIntSize; dir:Integer );
procedure MF_Cols_FFTtoC( MY:cfMatrix; MX:fMatrix; ht, len:UIntSize );
DescriptionThe one-dimensional Fourier transform of all columns of MX is calculated and stored in the corresponding columns of MY. The forward transform is obtained by setting dir = 1, the inverse (or backward) transform by setting dir = -1. A Fast Fourier Transform algorithm is used that requires ht to be a power of 2.  len may be set arbitrarily, but the function will be most efficient if len is a multiple of 4.
Complex version: Both MX and the output MY are complex matrices.
Real-to-complex version: The input matrix MX is real. The output matrix MY is complex. As this function can only perform a forward transform, no argument "dir" is needed.
Purely real version: For the forward transform, MX is a real matrix. The output MY is also defined as fMatrix, although it consists of complex numbers. The reason is that the symmetry properties of FFT allow to store the result in a packed format, fitting into the same memory space as the input matrix. The order of each column of MY is indicated in the following table. U means the uncompressed result, N is len.
Y0, iY1, iY2, i Y3, i  .....   YN-2, iYN-1, i
U0, i.ReUN/2, i.ReU1, i.ReU1, i.Im  .....   UN/2-1, i.ReUN/2-1, i.Im
 
For inverse real-matrix Cols_FFT, the input matrix has to be of this packed-complex format, and you get a real matrix. If you prefer to get the result of forward FFT in true complex format, use MF_Cols_FFTtoC.

About special versions with the prefixes MFs_, MFl_, and MFp_, consult chapter 4.8.

Error handlingIf ht is not a power of 2, VF_FFT (on which MF_Cols_FFT is based) complains "Size must be an integer power of 2" and the program is aborted.
See alsoMF_Rows_FFT,   MF_FFT,   chapter 12,   chapter 4.8 of http://www.optivec.com/vecfuncs/

MatrixLib Table of Contents  OptiVec home