HW_7_sol - w0 = pi fundamental frequency T0 = 2*pi/w0...

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

View Full Document Right Arrow Icon
DKL:10/31/06 HW 7 1/2 HW 7 ECE 2704 Due 10-27-06 1 Consider the periodic signal shown in Figure P7.3.7. 1 2 3 -1 -2 -3 1 ... ... t x ( t ) Figure P7.3.7 The Fourier series of this signal is x ( t ) = 1 4 + e ! jm " 2 1 m " ( ) 2 ! 1 jm " # $ % ( ! 1 2 1 ( m " ) 2 # $ % ( ) * + , - . e jm " t m = !/ m 0 0 / 1 (a) (10) Write a Matlab program to plot the partial sums x ! m 1 : m 1 ( t ) . Include your code. (b) (20) Plot the partial sums for the m 1 = 10 . On your own: Look at the partial sums for m 1 = 0,1,2,5,10,20 . Note how the series converges. Observe the Gibb’s phenomena.
Background image of page 1

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

View Full Document Right Arrow Icon
DKL:10/31/06 HW 7 2/2 Solution Problem 7.3.7: The Fourier series is shown in Figure P7.3.7. The MATLAB code follows. % P7_3_7.m clear % define parameters
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: w0 = pi; % fundamental frequency T0 = 2*pi/w0; % fundamental period % calculate positive coefficients M = 15; % number of terms ind = 1; for mm = -M:M if mm ~= 0 X(ind) = (exp(-j*mm*pi)/2); % coefficients X(ind) = X(ind)*((1/(mm*pi)^2)-(1/(j*mm*pi))); X(ind) = X(ind)-1/(2*(mm*pi)^2); elseif mm == 0 X(ind) = 0.25; end ind = ind + 1; end % create signal t = linspace(-2*T0,2*T0,600); % time vector x = zeros(size(t)); ind = 1; for mm = -M:M x = x + X(ind)*exp(j*mm*w0*t); ind = ind + 1; end figure(1) plot(t,x,'k'); xlabel('time') title('Problem 7.3.7') Figure P7.3.7...
View Full Document

{[ snackBarMessage ]}

Page1 / 2

HW_7_sol - w0 = pi fundamental frequency T0 = 2*pi/w0...

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

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