I have a wave that is a sum of sines and cosines:
$$x = A\sin(\omega t + \phi_1) + B \cos(2\omega t + \phi_2) + C\sin(2\omega t + \phi_3) + D\cos(2\omega t + \phi_4).$$
Now I use fft on $x$ and get the magnitude with abs(fft(x)). How do I get $A$, $B$, $C$, and $D$ back? The reason behind this is that I am new to fft and I am trying to understand the output that Matlab fft gives back in depth. Thank you PS: I can not use ifft in any of this. Also as you can tell I am new to FFT, any of you can recommend a good source to start with ? Thank you so much for your time...