{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

ps6_soln

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

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

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

View Full Document

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

View Full Document

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

View Full Document
EE 350 Problem Set 6 Solutions -7- Problem 29:

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

View Full Document
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]' )

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

View Full Document
EE 350 Problem Set 6 Solutions -11- Problem 30:

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

View Full Document
EE 350 Problem Set 6 Solutions -12- Problem 30: % Problem Set 6, Problem 30, Part 3 % Define signal parameters A = 3;

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

View Full Document

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

View Full Document

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

View Full Document

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.

{[ snackBarMessage ]}