Skip to content

Commit feab1f0

Browse files
authored
Add files via upload
1 parent 22cf610 commit feab1f0

File tree

4 files changed

+1092
-0
lines changed

4 files changed

+1092
-0
lines changed

CC_Value.m

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
function cc=CC_Value(A, B)
2+
3+
[n,m]=size(A);
4+
5+
temp1=0.0; temp2=0.0; temp3=0.0;
6+
A_mean=mean2(A);
7+
B_mean=mean2(B);
8+
9+
for i=1:n
10+
for j=1:m
11+
12+
temp1=double(A(i,j)-A_mean)*double(B(i,j)-B_mean)+temp1;
13+
temp2=double(A(i,j)-A_mean)*double(A(i,j)-A_mean)+temp2;
14+
temp3=double(B(i,j)-B_mean)*double(B(i,j)-B_mean)+temp3;
15+
end
16+
end
17+
18+
if (temp2*temp3~=0)
19+
cc=temp1/sqrt(temp2*temp3);
20+
else
21+
cc=-2;
22+
end
23+
24+
end

0 commit comments

Comments
 (0)