Homework 2 Matlab Solution

Homework 2 Matlab Solution - Problem 6 a= 2-1 6 points 3 7...

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

Problem 6 6 points a = 2 -1 3 7 1 2 -3 0 >> b = [1 -1 2 -2 4 1 -2 5] b = 1 -1 2 -2 4 1 -2 5 >> c = xcorr(a, b) c = Columns 1 through 7 10.0000 -9.0000 19.0000 36.0000 -14.0000 33.0000 -0.0000 Columns 8 through 14 7.0000 13.0000 -18.0000 16.0000 -7.0000 5.0000 -3.0000 Column 15 -0.0000 C is in accordance to the Rxy in the example 2.6.1, c(1) = Rxy(-7), c(2) = Rxy(-6), etc. Problem 7 6 points Source code % EE 4541 % hw2 Problem 7 , Sep.22, 2007 load Assignment1.mat ; % remove the DC component from the 3 waveforms ecg1 = detrend(ecg); aortic1 = detrend(aortic); radial1 = detrend(radial);

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

View Full Document
%(a) xc1 = xcorr(aortic1, ecg1, 'coef' ); l = -1999:1999; plot(l, xc1); title( 'correlation between aortic pressure and ECG' ); ylabel( 'Correlation Rxy' ); xlabel( 'index l' ); % (b) figure; xc2 = xcorr(aortic1, radial1, 'coef' ); plot(l, xc2); title( 'correlation between aortic pressure and radial' ); ylabel( 'Correlation Rxy' ); xlabel( 'index l' ); % (c) figure; B = ones(15,1)/15; % the order 14 filtering vector
This is the end of the preview. Sign up to access the rest of the document.

This homework help was uploaded on 04/17/2008 for the course EE 4541 taught by Professor Ebbini during the Fall '08 term at Minnesota.

Page1 / 5

Homework 2 Matlab Solution - Problem 6 a= 2-1 6 points 3 7...

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

View Full Document
Ask a homework question - tutors are online