📄 autocorrelation.m
字号:
function Autocorrelation = Autocorrelation(file, Strength, lag)
% This function ->
% Autocorrelation: open auto'i', calculates the autocorrelation with
% the lag passed as an argument. The autocorrelation, Lags and bounds
% are outputted to the screen while the specific autocorrelation is
% printed to auto'i'
filename = sprintf('auto%d',file);
fid = fopen(filename,'w');
extract = '0';
if (fid == -1)
disp(['ERROR: File not found or could not be opened for read. Please check auto file name']);
end
[ACF,Lags,Bounds] = autocorr(Strength, 16)
extract = ACF(lag + 1)
fprintf(fid, '%f\n', extract);
fclose(fid);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -