Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

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.

share|improve this question
    
Can you include the cosines? –  daniel Mar 27 '12 at 9:18
    
Sure! There you go! –  user968243 Mar 27 '12 at 9:29
    
This should be easy to check. I will be logged off for a while. If no one else gets to it I'll look later. –  daniel Mar 27 '12 at 9:36
    
Thanks for your time! –  user968243 Mar 27 '12 at 9:39
    
This looks very much like homework and if so, the OP should add the homework tag. Also, it might be best to request the moderators to move the question to dsp.SE. –  Dilip Sarwate Mar 27 '12 at 11:09

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.