ps6_soln - EE 350 Problem 29 Problem Set 6 Solutions-7 EE...

Info iconThis preview shows pages 1–12. 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
Background image of page 2
Background image of page 3

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

View Full DocumentRight Arrow Icon
Background image of page 4
Background image of page 5

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

View Full DocumentRight Arrow Icon
Background image of page 6
EE 350 Problem Set 6 Solutions -7- Problem 29:
Background image of page 7

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

View Full DocumentRight Arrow Icon
EE 350 Problem Set 6 Solutions -8- Problem 29: % Problem Set 6, Problem 29, Part 3 % Define signal parameters A = 3; % Amplitude of f(t) To = 1e-9; % Period of f(t) a0 = A /2; % Average value of f(t) Pf = A^2 / 2; % power of f(t) % define the time vector t = linspace(0,5*To,1000); % Generate PE N_Pe = 50; N = [1:N_Pe]; PE = zeros(N_Pe,1); p = Pf - a0^2; for n = 1 : N_Pe bn = (1 - (-1)^n)*A/(n*pi); % bn = 0 when n even p = p - bn^2/2; PE(n) = p; end % generate f(t) f = A*(0.5*square(2*pi*t/To) + 0.5); % generate g(t) for N = 3; g3 = a0; for n = 1 : 3 bn = (1 - (-1)^n)*A/(n*pi); g3 = g3 + bn*sin(2*pi*n*t/To); end ; % generate g(t) for N = 50; g50 = a0; for n = 1 : 50 bn = (1 - (-1)^n)*A/(n*pi); g50 = g50 + bn*sin(2*pi*n*t/To); end ; % Plot the results figure(1) subplot(211) plot(N,PE, 'o' ) xlabel( 'N' ) ylabel( 'Pe' ) title( 'Problem 29 Part 3' ) subplot(212) plot(t*1e9, f, '-r' , t*1e9, g3, '--g' , t*1e9, g50, '-.b' ) legend( 'f(t)' , 'g(t) for N = 3' , 'g(t) for N = 50' ) ylabel( 'Amplitude' ) xlabel( 'Time [ns]' )
Background image of page 8
Background image of page 9

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

View Full DocumentRight Arrow Icon
Background image of page 10
EE 350 Problem Set 6 Solutions -11- Problem 30:
Background image of page 11

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

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

This note was uploaded on 07/23/2008 for the course EE 350 taught by Professor Schiano,jeffreyldas,arnab during the Fall '07 term at Penn State.

Page1 / 22

ps6_soln - EE 350 Problem 29 Problem Set 6 Solutions-7 EE...

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

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