{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Matlab+Lab2+solution

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

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

Matlab Lab2 solution: 1. Problem 1 Period of the signal=4 Problem 2

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

View Full Document
Nyquist rate: 20Hz Problem3 Problem 4
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' );

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

View Full Document
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
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### 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
Ask a homework question - tutors are online