Geky wrote:
I need a DFT C++ code that can find amplitude and phase of a waveform.
I have searched it in the web but there are only complicated code. I
need a very simple DFT code in C++.
Yours is not a C++ *language* question, which is the topic of this
group (see
http://www.parashift.com/c++-faq-lit....html#faq-5.9). You
should ask on comp.sources.wanted, comp.dsp, or similar. BTW, you
probably could do with plain old C code since there's not much to the
DFT (at least insofar as you have stated your requirements) that lends
itself to C++'s differing capabilities. Also, unless this is a purely
educational exercise, it is not unlikely that you actually want code
for the FFT (fast Fourier transform), which is what is almost always
used in practice -- in which case, you should look at fftw.org.
Cheers! --M