PS4soln

PS4soln - Problem 1: c) Figure 1, Plot of x(t) and its Kth...

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

View Full Document Right Arrow Icon
Background image of page 1

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

View Full DocumentRight Arrow Icon
Problem 1: c) Figure 1, Plot of x(t) and its Kth order approximations for K=1, K=10 and K=100 wrt t. MATLAB CODE: clear w=pi; dt=0.01; t=0:dt:4; K=[1 10 100]; colors={'r','b','g','k'}; Ro=1/2; for index=1:length(K) kmax=K(index); k=1:kmax; Rk=sinc(k/2); ang=-k*pi/2; xk=Ro; for ii=1:kmax xk=xk+Rk(ii)*cos(ii*w*t+ang(ii)); end plot(t,xk,colors{index},'LineWidth',1.5), hold on end x=(square(t*pi)+1)/2; %actual square wave signal plot(t,x,colors{index+1},'LineWidth',1.5), hold on hold off legend('K=1','K=10','K=100','x(t)'), grid title('Kth order approximation for x(t)'); Comments: As it can be seen from figure 1, as K increases, Kth approximation for x(t), x K (t), converges to the actual signal x(t). However, the partial sum in the vicinity of the discontinuity exhibits ripples and that the peak amplitude of these ripples does not seem to decrease with increasing K. As K increases, the ripples in the partial sums become compressed toward the
Background image of page 2
discontinuity, but for any finite value of K, the peak amplitude of the ripples remains constant. This behaviour has come to be known as the Gibbs phenomenon. The implication is that the
Background image of page 3

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

View Full DocumentRight Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 08/06/2008 for the course ECE 130A taught by Professor Madhow during the Fall '07 term at UCSB.

Page1 / 7

PS4soln - Problem 1: c) Figure 1, Plot of x(t) and its Kth...

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

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