I was given the following task.
b) In this task you will concatenate the seven cosines from task a) into one 7 sec long vector. To concatenate vectors in MATLAB use: x=[x1 x2 x3 x4 x5 x6 x7]; Use calculations and/or your conceptual understanding of spectra to predict what you’d expect the spectrum of this signal to look like. Confirm this hypothesis by again using fft() in MATLAB to plot the actual spectrum. If MATLAB differs from your predictions explain why this is so.
c) In this task create a new variable and add together your seven cosines: x=x1+x2+x3+x4+x5+x6+x7; Again use calculations and/or your conceptual knowledge of the topic to make a prediction about what you’d expect the spectrum of this signal to look like. Now use MATLAB to confirm your hypothesis.
Explain why the spectra in parts b and c are the same even though the signals are different.
All cosines have the same amplitude, 1, and they have different frequencies.
Now, I'm pretty sure that the spectra in part b and c are not the same (the magnitude of the spikes in part c are less than in part b).
Furthermore, I don't see how it's possible for two functions to have the same spectrum! To me, that's like saying that a sum of cosines and sines can give two different results!
Comments would be appreciated. I have no idea whether what the lecturer is saying here is correct; personally, it doesn't seem possible that two function could have the same spectrum...
Thanks!
P.S. I've actually performed an FFT on the functions, and I get different spectra (though, if I modifiy my MATLAB code in a way that I believe makes my spectra incorrect, I get the same spectra).
Edit: Cosines as requested:
$\cos(2\pi \cdot f_n \cdot t + \phi_n)$ where $f_n = \{900, 900, 900, 1000, 1200, 400, 1200\}$ and $\phi_n = \{\frac{3\pi}{10}, -\frac{3\pi}{10}, \frac{3\pi}{10}, -\frac{2\pi}{10}, 0, -\frac{8\pi}{10}, 0\}$.
If you would like my code to generate the cosines, I can provide it.