So, suppose you have a superposition of cosines of the same magnitude: $\sum_{i}\cos[\omega_i t]$
When you take the Fourier transform, theoretically you'd expect to find $\delta$-like peaks of the same magnitude. But in practice, what I find is this:
How would you explain this variation in the magnitude? Given such variation, would it be possible to recover the amplitudes of each frequency component in a superposition $\sum_{i}A_i\cos[\omega_i t]$
EDIT: I suspect it has to do with the relationship between the sampling frequency and the frequencies of the components. The fact that the theoretical $\delta$ response exists is a consequence of the orthogonality of the FT kernel. So, I suppose that in the discrete case, the frequencies of the DFT lines don't exactly "match" the sampled frequencies of the signal. I don't know how to articulate this properly or if it's even correct though.
For reference, here's the MATLAB code I used to generate this
Fs = 100;
Sp = 1/Fs;
L = 2000;
t = (0:L-1)*Sp;
y2 = cos(5.*t)+cos(25.*t)+cos(10.*t)+cos(1.*t)+cos(100.*t)+cos(200.*t)+cos(300.*t);
Y = fft(y2);
P2 = abs(Y/L).^2;
P1 = P2(1:L/2+1);
P1(2:end-1) = 2*P1(2:end-1);
f = Fs*(0:(L/2))/L;
figure
plot(f,P1,'-k','Linewidth',1);