Global Index (all files) (short | long) | Local Index (files in subdir) (short | long)
dofx = dof(data);
dofx = dof(data);
| This function calls | |
|---|---|
function dofx = dof(data);
[m, n] = size(data);
if m == 1; data = data'; [m, n] = size(data); end;
% The following calculates the one lag autocorrelation, based
% on the one lag, and two-lag autocorrelations (the sqrt of the
% two lag autocorrelation is used to 'improve' the estimate).
for i = 1:n;
acorr(i) = (corr(data(:,i), data(:,i), 1) + ...
sqrt(corr(data(:,i), data(:,i), 2))) ./ 2;
end
dofx = -0.5 * m * log(abs(real(acorr)));
for i = 1:n;
dofx(i) = min([m dofx(i)]);
end