C++
C#
VB
JScript
All

# fft

Copyright (C) 2005 IENT-RWTH Aachen

template<class G1,class G2> inline void fft(const Vector<G1> &X, Vector<G2> &Y)
template<class G> inline PROMOTE2(complex<float>,Vector<G>) fft (const Vector<G> &X)
template<class G1,class G2> inline void fft (const Matrix<G1> &X, Matrix<G2> &Y)
template<class G> inline PROMOTE2(complex<float>,Matrix<G>) fft (const Matrix<G> &X)

FFT of a signal

Parameters

Y | The complex FFT
X | The signal

Returns

Dense array of complex elements

Example

    DenseVector<complex<float> >::self X(4, 1);
    DenseVector<complex<float> >::self Y(X.size());
    fft(X,Y);

    DenseVector<complex<float> >::self X(4, 1);
    fft(X,X); // in place

    DenseVector<double>::self X(4, 1);
    DenseVector<complex<double> >::self Y;
    Y=fft(X);

See Also

half_real_fft