Implementation of the cross correlation

Hey, the beautiful pupil of the world. I'm trying to implement the formula below to MATLAB. The thing I'm not sure that I used the correct code for cross-correlation (xcorr2(a,b)) Could you help me to figure it out? here is the code I used;
a=2;
l=2;
%%r1 and r2 are complex doubles that I found before...
%%%sum_1 and sum_2 are the part of the d1's numerator
sum_1 = 0.5*(l)*(l+1);
sum_2 = r1.^a;
numer_1 = xcorr2(sum_1,sum_2);
denomin_1=l*(r1.^a);
d1=numer_1./denomin_1;
%%%sum_3 and sum_4 are the part of the d1's numerator
sum_3 = 0.5*(l)*(l+1);
sum_4 = r2.^a;
numer_2 = xcorr2(sum_3,sum_4);
denomin_2=l*(r2.^a);
d2=numer_2./denomin_2;
thanks in advance.

Answers (0)

Categories

Find more on Mathematics in Help Center and File Exchange

Asked:

on 28 Nov 2017

Community Treasure Hunt

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

Start Hunting!