[go: up one dir, main page]

Menu

[847d38]: / init / autocorr.m  Maximize  Restore  History

Download this file

21 lines (14 with data), 309 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
% cor=autocorr(data) : Calculates autocorrelation function of columns of data
% GUISDAP v.1.60 96-05-27 Copyright Asko Huuskonen and Markku Lehtinen
%
function cor=autocorr(data)
[m n]=size(data);
check=0;
if (m==1)
data=data';
check=1;
end;
cor=conv(data,flipud(data));
if (check==1)
cor=cor';
end;