c++ - Inverse fast fourier transform: different phases -
rosettacode gives simple implementation of cooley–tukey fft algorithm here. question following , mathematical , programming point of view. suppose input of program spectrum of signal, , want generate signal has such spectrum. if correct, need take inverse fft of input spectrum.
the code given rosettacode following:
// inverse fft (in-place) void ifft(carray& x) { // conjugate complex numbers x = x.apply(std::conj); // forward fft fft( x ); // conjugate complex numbers again x = x.apply(std::conj); // scale numbers x /= x.size(); } but can generate 1 signal. several signals can have same spectrum. how add parameter able generate these different signals?
no, different signals have different fourier transforms; invertible. n complex numbers in, n complex numbers out; discrete fourier transform amounts multiplying vector of samples nonsingular matrix, getting vector of same size.
you might confusing actual fourier transform "spectrum" obtained taking magnitude of fourier transform or result of other information-destroying operations.
Comments
Post a Comment