HW_Set_3_solutions - Introduction to Signal Processing...

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

View Full Document Right Arrow Icon
Introduction to Signal Processing Hayder Radha - 1 - ECE 366 Homework Set #3 Solutions Wednesday, February 11, 2009 ECE 366 – Introduction to Signal Processing Spring 2009 Michigan State University Department of Electrical and Computer Engineering [1] Study MatLab Section M2.4 in the book ( Graphical Understanding of Convolution ). Do the following items that relate to this convolution integral problem: (a) See the book for the solution of this part of the problem . (b) The program in the book is implemented based on time-inversion and time shifting of the input signal, ( ) xt τ while keeping the impulse response stationary () h . Modify your program such that the impulse response is time- inverted and time-shifted ( ) ht while keeping the input signal stationary x . Re-plot M2.3, M2.4, and M.25. Is the output at these time instances the same as the output of the corresponding time instances from part Error! Reference source not found. ? % ECE 366 Spring 2009 - HW 3 - Problem 1 (b) % MS2P4 figure(1) x = inline( '1.5*sin(pi*t).*(t>=0&t<1)' ); h = inline( '1.5*(t>=0&t<1.5)-(t>=2&t<2.5)' ); dtau = 0.005; tau = -1:dtau:4; dt=0.1; tmin=-1; tmax=4.0; ti = 0; tvec = tmin:dt:tmax; y= NaN*zeros(1,length(tvec)); %Pre-Allocate Memory for t = tvec, ti = ti+1; xh =x(tau).*h(t - tau); lxh = length(xh); y(ti) = sum(xh.*dtau); %Trapeziodal approximation of integral subplot(2,1,1), plot(tau,h(t-tau), 'k-' ,tau,x(tau), 'b--' ,t,0, 'or' ); axis([tau(1) tau(end) -2.0 2.5]); xlabel( '\tau' ); legend( 'h(t-\tau)' , 'x(\tau)' , 't' , 'Location' , 'NorthEast' ); subplot(2,1,2), plot(tvec,y, 'r' ,tvec(ti),y(ti), 'or' ); axis([tau(1) tau(end) -1.0 2.0]); grid; drawnow; end
Background image of page 1

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

View Full DocumentRight Arrow Icon
Introduction to Signal Processing Hayder Radha - 2 - ECE 366 -1 -0.5 0 0.5 1 1.5 2 2.5 3 3.5 4 -2 -1 0 1 2 τ -1 -0.5 0 0.5 1 1.5 2 2.5 3 3.5 4 -1 0 1 2 h(t- τ ) x( τ ) t -1 -0.5 0 0.5 1 1.5 2 2.5 3 3.5 4 -2 -1 0 1 2 τ -1 -0.5 0 0.5 1 1.5 2 2.5 3 3.5 4 -1 0 1 2 h(t- τ ) x( τ ) t Figure P1b.1 Convolution results at time 0.75 t = (right) and time 2.25 t = (left). -1 -0.5 0 0.5 1 1.5 2 2.5 3 3.5 4 -2 -1 0 1 2 τ -1 -0.5 0 0.5 1 1.5 2 2.5 3 3.5 4 -1 0 1 2 h(t- τ ) x( τ ) t -1 -0.5 0 0.5 1 1.5 2 2.5 3 3.5 4 -2 -1 0 1 2 τ -1 -0.5 0 0.5 1 1.5 2 2.5 3 3.5 4 -1 0 1 2 h(t- τ ) x( τ ) t Figure P1b.2 Convolution results at time 2.85 t = (left) and 4.0 t = (right). The output results are identical for both cases (a) and (b) since the two convolution expressions are equivalent.
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 06/08/2009 for the course ECE 366 taught by Professor Staff during the Spring '08 term at Michigan State University.

Page1 / 9

HW_Set_3_solutions - Introduction to Signal Processing...

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

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