Matlab+Lab2+solution

Matlab+Lab2+solution - Matlab Lab2 solution: 1. Problem 1...

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

View Full Document Right Arrow Icon
Matlab Lab2 solution: 1. Problem 1 Period of the signal=4 Problem 2
Background image of page 1

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

View Full DocumentRight Arrow Icon
Nyquist rate: 20Hz Problem3 Problem 4
Background image of page 2
Convolution length=length(x)+length(h)-1=3 Code: P1: clear all clc n=-8:1/100:8; hDC=0.5; i=1 for k=[1 3 5 7 9 11 13] h(i,:)=(2/(pi*k))*sin((2*pi*k*n/4)+(pi*k/2)); i=i+1; end subplot(4,1,1) plot(n,hDC+h(1,:)) title( 'DC added to first harmonic' ); xlabel( 'time' ); ylabel( 'Magnitude(DC+H1)' ); subplot(4,1,2) plot(n,hDC+h(1,:)+h(2,:)) title( 'DC added to first and second harmonic' ); xlabel( 'time' ); ylabel( '(DC+H1+H2)' ); subplot(4,1,3) plot(n,hDC+h(1,:)+h(2,:)+h(3,:)) title( 'DC added to first, second and third harmonic' );
Background image of page 3

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

View Full DocumentRight Arrow Icon
xlabel( 'time' ); ylabel( '(DC+H1+H2+H3)' ); subplot(4,1,4) plot(n,hDC+h(1,:)+h(2,:)+h(3,:)+h(4,:)+h(5,:)+h(6,:)+h(7,:)) title( 'DC added to first, second, third, fouth, fifth, sixth and seventh harmonic' ); xlabel( 'time' ); ylabel( '(DC+H1+H2. .+H6+H7)' ); P2. t = 0:1/10000:1; fin = 10; x = sin(2*pi*fin*t); plot(t,x);hold
Background image of page 4
Background image of page 5
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 01/03/2012 for the course EEL 3135 taught by Professor ? during the Fall '08 term at University of Florida.

Page1 / 5

Matlab+Lab2+solution - Matlab Lab2 solution: 1. Problem 1...

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

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