Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] Cross-correlation in matlab without using the inbuilt function?

Status
Not open for further replies.

electricalpeople

Newbie level 6
Joined
Jul 28, 2011
Messages
11
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,365
can someone tell how to do the cross-correlation of two speech signals(each of 40,000 samples) in the matlab without using the inbuilt function Xcorr and how do I find correlation coefficient?
Please be tolerant.Thanks in advance.
 
Last edited:

Hi

U can correlate by using a multiplier and an adder (for summing)

a sliding window function shows the peak when the two signals are matched


Regards
M Kalyan srinivas
 
Check if this is helpful for you!

Code:
clc;
clear all;
close all;

x=input('Enter the first Sequence : ');
h=input('Enter the second sequence : ');

n=length(x);
m=length(h);
k=n+m-1;
x=[x zeros(1,k-n)]';
h=wrev(h);
h=[h zeros(1,k-m)]';
for i=1:k
c(:,i)=circshift(x,i-1);
end
y=c*h;
disp('Correlation of the sequences')
disp(y');
 
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top