- refactored
This commit is contained in:
Executable
+15
@@ -0,0 +1,15 @@
|
||||
% correl(x,y,N)
|
||||
|
||||
function rxy = corrlp(x,y,S)
|
||||
|
||||
L = lge(x);
|
||||
N = L-S;
|
||||
|
||||
if (N == 0)
|
||||
error('N = 0 !');
|
||||
end;
|
||||
|
||||
for s=1:S,
|
||||
rxy(s)=sum(x(S-s+1:L-s+1).*y(S:L))^2/(sum(x(S-s+1:L-s+1).^2)*sum(y(S:L).^2));
|
||||
%rxy(s)=abs(sum(x(S-s+1:L-s+1).*y(S:L)))/(sum(abs(x(S-s+1:L-s+1).*y(S:L)))+0.0001);
|
||||
end;
|
||||
Reference in New Issue
Block a user