You are required to write a stand-alone DSP application in the C programming language.
The overall objective of this application is to convert a signal from the time domain to the frequency domain so that its amplitude spectrum can be observed.
This application will take as its input a digital signal in the time domain (i.e. a sampled waveform) and perform a discrete Fourier transform (DFT) on it to produce its amplitude spectrum which can then be output in numerical and graphical form.
The number of waveform samples input to the algorithm can be chosen by the user to vary anywhere within the range 8 to 1000. These will be stored in a real array, x.
The resulting amplitude spectrum must be presented to the user in single-sided format and stored in a real array, X.
The application must be tested thoroughly to prove its accuracy. It is suggested this is done with,
(a) A sinusoid
(b) A squarewave
(c) A waveform consisting of the addition of 3 sinusoids.