Presentation is loading. Please wait.

Presentation is loading. Please wait.

MATLAB Session 7 ES 156 Signals and Systems 2007 HSEAS Prepared by Jiajun Gu.

Similar presentations


Presentation on theme: "MATLAB Session 7 ES 156 Signals and Systems 2007 HSEAS Prepared by Jiajun Gu."— Presentation transcript:

1 MATLAB Session 7 ES 156 Signals and Systems 2007 HSEAS Prepared by Jiajun Gu

2 Outline Speech signal processing Filter design

3 *.wav file *.wav file: a file format for storing digital audio (waveform) data Information in a *.wav file: –Sampling frequency –Number of bits per sample –# of Channels: mono, stereo

4 Read a wav file to matlab Download the test.wav from course website. Play it in windows media player or realplayer, or any player software. Load it into MATLAB y=wavread(‘filename’); [y,fs,bits]=wavread(‘filename’)

5 Play a wav file in matlab [y,fs,bits]=wavread('test.wav'); wavplay(y,fs); Or use sound sound(y,fs); Plot the speech data (n=1001 to n=2000)

6 Frequency domain Y_omega=fft(y,4096); Y_omega=fftshift(Y_omega); figure;plot(abs(Y_omega));

7 Frequency domain –mapping to frequency domain figure; plot(linspace(-fs,fs,4096),abs(Y_omega)); axis tight;

8 Listen to the signal with different frequencies sound(y,fs); sound(y,fs*2); sound(y,fs*4); sound(y,fs/2); sound(y,fs/4);

9 Filter design Ideal filters do not exist in reality Nonideal filters are of great importance in practical Filter prototype: –A set of classic low-pass filters, with cut off frequency at 1Hz –The forms of the frequency response are given for engineering design.

10 Filter design specification

11 Design a low-pass filter Bessel filter [b,a]=besself(5,100) freqs(b,a)

12 Design a low-pass filter Butterworth filter [b,a]=butter(5,100,’s’); freqs(b,a)

13 Design a high-pass filter [b,a]=besself(5,100,’high’) freqs(b,a)


Download ppt "MATLAB Session 7 ES 156 Signals and Systems 2007 HSEAS Prepared by Jiajun Gu."

Similar presentations


Ads by Google