?? autocorrelation.m
字號:
function [tau] = AutoCorrelation(X,maxLags,IsPlot)% 自相關法求混沌時間序列重構的時間延遲% 輸入參數:X 混沌時間序列% maxLags 最大時間延遲% 輸出參數:tau 時間延遲 ACF = autocorr(X,maxLags); % 求自相關函數% 自相關函數下降到初始值的 1-1/e 時的 tau 即為所求 (tau 從 1 開始)gate = (1-exp(-1))*ACF(1);temp = find(ACF<=gate);if (isempty(temp)) disp('err: max delay time is too small!') tau = [];else tau = temp(1)-1 endif IsPlot figure; plot(0:length(ACF)-1,ACF,'+:',0:length(ACF)-1,ones(length(ACF),1)*gate,'r') xlabel('Lag'); title('自相關法求時延');end
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -