MATLAB Example – Simulating the Speech Scrambler

2 you would use axis07000012 you can also label the

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: use the command: [H,w]=freqz(h,1,512); This command creates the frequency response H of the DT filter having impulse response h. The frequency response is calculated at 512 angular frequencies in the range 0 ≤ ω ≤ π , with frequencies stored in the vector w. Recall that F = ω / 2π and that we have the CT- DT frequency relation f = F / Ts . So, to plot the filter’s CT magnitude response vs. f, set f=(1/(2*pi*Ts))*w; plot(f,abs(H)) Note that you can use the axis command to adjust the horizontal and vertical axis limits in the plot – for example, to view the plot on the frequency range 0 – 7000 Hz and amplitude range 0 – 1.2, you would use axis([0,7000,0,1.2]) You can also label the plot axes – for example, xlabel(‘f’) ylabel(‘|H(f)|’) The plot is shown below. To bandlimit our speech signal to 5 kHz, we apply the filter we created...
View Full Document

Ask a homework question - tutors are online