필터 지우기
필터 지우기

Normalized Cross correlation, Normalized autocorrelation

조회 수: 16 (최근 30일)
mahdi safarzadeh
mahdi safarzadeh 2013년 10월 26일
답변: Wayne King 2013년 10월 27일
Hey everybody, I have these Golay Sequences: GolaySeq=[+1 +1 -1 -1 -1 -1 -1 -1 -1 +1 -1 +1 +1 -1 -1 +1]; Vec=[ repmat(GolaySeq,1,16) -GolaySec]; SNR=20; Vec2 = awgn(Vec,SNR); Now I want to have Normalized Cross correlation and Normalized autocorrelation of it like attached file. Could anybody help me out of this? Tnx a lot.

답변 (2개)

zainab alsaffar
zainab alsaffar 2013년 10월 26일
corr2(A,B) u can use it for cross and auto normalized correlation
  댓글 수: 2
mahdi safarzadeh
mahdi safarzadeh 2013년 10월 26일
Thanks a lot dear zainab, I know how to calculate the autocorrelation or cross-correlation. I don't know how to do a normalization with the formula I just attached. of course in the formula instead of 128 I should put 16(the size of my vector)
Greg Heath
Greg Heath 2013년 10월 27일
What 128 ?
Isn't corr2 already scaled?
corr2(zscore(A,1),zscore(B,1))= corr2(A,B)

댓글을 달려면 로그인하십시오.


Wayne King
Wayne King 2013년 10월 27일
If you have the Signal Processing Toolbox, use xcorr(). I'll assume your -GolaySec above is a typo and should read -Golayseq
GolaySeq=[+1 +1 -1 -1 -1 -1 -1 -1 -1 +1 -1 +1 +1 -1 -1 +1];
Vec=[ repmat(GolaySeq,1,16) -GolaySeq];
SNR=20;
Vec2 = awgn(Vec,SNR);
% normalized autocorrelation
[ac,lags] = xcorr(Vec2,'coef');
% cross correlation
[xc,lags] = xcorr(Vec,Vec2,'coef');
Choose the appropriate number of lags for your purposes.

카테고리

Help CenterFile Exchange에서 Correlation and Convolution에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by