DTFT, DFT, ZT, and FFT 523
Example 5.8Let a communication signal consist of a random noise signal plus an information signal
f(t) consisting of three frequencies—1000, 2000, and 3000 Hz.
The noise signal and information signal f(t) are defi ned as follows:noise = [0 0.5*randn(1, 255)]f(t) = 0.7sin(2π1000 t) + 0.93cos(2π 2000 t) + 0.69sin(2π3000 t)Let the communication signal be given by signal(t) = noise + f(t), over the range 0 < t <
(1/8000)255, where the sampling period is Ts = (1/8000) s and its sequence length of
N = 256.
Create the script fi le signal_n that returns the contaminated signal signal(t) in the
time and frequency domains. Observe that in the time domain, the frequencies 1000,
2000, and 3000 Hz are not clearly evident, while in the frequency domain its present is
clearly visible.MATLAB Solution
% Script file: signal _ n
fs = 8000;Ts =1/fs;
N=256;t = linspace(0,Ts*255,256);noise = [0 0.5*randn(1,255)];0 50 100 150 200 250 3000 50 100 150 200 250 300
Index kDTFTDTFT420− 2− 4420− 4− 2DFT for k = 64DFT for k = 32Phase of the DTFT and DFTPhase anglePhase angleFIGURE 5.36
Phase plots of DTFT and DFT of f(n) of Example 5.7.