Fs = 8192; numberOfSeconds = 2; n = 1 : numberOfSeconds*Fs; f0 = 660; w0 = 2*pi*f0/Fs; noteSound = cos(w0*n); sound(noteSound);
The following Matlab code will plot the spectrum of the signal defined by y:
y = noteSound; freqPoints = (-1 + 2*cumsum(ones(1,length(y)))/length(y))*Fs/2; magValuesIndB = 20*log10(fftshift(abs(fft(y)))); plot( freqPoints, magValuesIndB );
Tthe transmitter consists of (1) sinusoidal amplitude modulation due to multiplication by cos(2 pi fc t) and (2) bandpass filtering represented by its frequency response |H(f)|. You can assume an amplitude of one for the bandpass filter over the passband frequencies of -fc - fm < f < -fc and fc < f < fc + fm. Also, you can assume that the phase is zero over the passband of the bandpass filter so that the plot of |H(f)| is also the plot of H(f).
The communication channel, which is ideal, is represented by the arc that connects the transmitter output yt to the receiver input xr. That is, |H(f)| does not represent the frequency response of the communication channel as suggested in the note for problem 9.2 on the homework assignment.
The receiver consists of sinusoidal amplitude demodulation, which consists of (1) sinusoidal amplitude modulation due to multiplication by cos(2 pi fc t) and (2) lowpass filtering.
In this problem, you should choose fm so that yf(t) = xt(t).
It is easier to work this problem in the Fourier domain (frequency domain) by drawing pictures. In particular, the following two Fourier transform properties will be very helpful: