PS4soln

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

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

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

View Full Document
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
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

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

View Full Document
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
Ask a homework question - tutors are online