Program_2_7 - n1 = length(y)-1; n2 = length(x)-1; r =...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
% Program 2_7 % Computation of Cross-correlation Sequence % x = input('Type in the reference sequence = '); y = input('Type in the second sequence = '); % Compute the correlation sequence
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: n1 = length(y)-1; n2 = length(x)-1; r = conv(x,fliplr(y)); k = (-n1):n2'; stem(k,r); xlabel('Lag index'); ylabel('Amplitude'); v = axis; axis([-n1 n2 v(3:end)]);...
View Full Document

Ask a homework question - tutors are online