20111eeM214A_1_ps311-sol

20111eeM214A_1_ps311-sol - xlabel(’Frames’);...

Info iconThis preview shows pages 1–11. Sign up to view the full content.

View Full Document Right Arrow Icon
UCLA Dept. of Electrical Engineering EE M214A, Winter 2011 Problem Set 3 Solution February 7, 2011 1. Answer: 1
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2
Background image of page 2
3
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2. 6.9 Answer: 4
Background image of page 4
5
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
6
Background image of page 6
7
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
3. 6.17 Answer: window size: 20 ms, window shift: 10 ms, window type: Hamming. [raw, fs] = wavread(wavfile); step = 0.01 * fs; m = 0.02 * fs; n = length(raw); framenum = floor((n - m)/step) + 1; hw = hamming(m); eng = zeros(1, framenum); mag = zeros(1, framenum); zcr = zeros(1, framenum); for i = 1:framenum istart = (i-1)*step+1; x = raw(istart: istart+m-1); hx = x.*hw; eng(i) = hx’*hx; mag(i) = sum(abs(hx)); for j=1:m-1 zcr(i) = zcr(i) + 1; % save index of zero-crossing end end zcr(i) = zcr(i) / m; end xl = 1:n; xs = 1:framenum; subplot(4,1,1); title(’s5male.wav’); hold on; plot(xl, raw, ’k’); xlabel(’Samples’); ylabel(’Amplitude’); axis tight; subplot(4,1,2); plot(xs, eng, ’b’, ’LineWidth’, 2);
Background image of page 8
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 10
Background image of page 11
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: xlabel(’Frames’); ylabel(’Engergy’); axis tight; subplot(4,1,3); plot(xs, mag, ’r’, ’LineWidth’, 2); xlabel(’Frames’); ylabel(’Magnitude’); 8 axis tight; subplot(4,1,4); plot(xs, zcr, ’m’, ’LineWidth’, 2); xlabel(’Frames’); ylabel(’Zero crossing rate’); axis tight; 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2 2.2 2.4 x 10 4-0.5 0.5 s5male.wav Samples Amplitude 50 100 150 200 250 5 10 Frames Engergy 50 100 150 200 250 10 20 Frames Magnitude 50 100 150 200 250 0.2 0.4 0.6 Frames Zero crossing rate 4. 7.5 Answer: 9 5. 7.6 Answer: 6. 7.12 Answer: 10 7. 8 Answer: 64-point window is better for formant detection, for it is wide band anaysis. 400-point window is better for pitch detection, for it is narrow band anaysis. 11...
View Full Document

This note was uploaded on 04/19/2011 for the course EE 214A taught by Professor Alwan during the Winter '11 term at UCLA.

Page1 / 11

20111eeM214A_1_ps311-sol - xlabel(’Frames’);...

This preview shows document pages 1 - 11. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online