HW_7_sol

# HW_7_sol - HW 7 ECE 2704 Due 1 Consider the periodic signal...

• Notes
• 2

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

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.

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

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
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

• Spring '08
• DJStilwell
• Fourier Series, #, partial sums, 2 \$, 2 4 M

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern