{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

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

Info iconThis preview shows pages 1–22. 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 Document Right 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 Document Right 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 Document Right 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 Document Right 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 Document Right 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 Document Right Arrow Icon
EE 350 Problem Set 6 Solutions -12- Problem 30: % Problem Set 6, Problem 30, Part 3 % Define signal parameters A = 3;
Background image of page 12
Background image of page 13

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

View Full Document Right Arrow Icon
Background image of page 14
Background image of page 15

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

View Full Document Right Arrow Icon
Background image of page 16
Background image of page 17

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

View Full Document Right Arrow Icon
Background image of page 18
Background image of page 19

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

View Full Document Right Arrow Icon
Background image of page 20
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}