?? main_boxdimension_ts.m
字號:
% 計算時間序列的盒維數 - 主函數clcclear allclose all%--------------------------------------------------------------------------% produce the FBM time series,Set parameter H to 0.6 and sample lengthrand('state',sum(100*clock))H = 0.6; lg = 1024;s = wfbm(H,lg); % 時間序列figure; plot(s,'.-')%--------------------------------------------------------------------------partition = 2^7; % 每一維坐標上的分割數[log2_C,log2_r] = BoxDimension_TS(s,partition);%--------------------------------------------------------------------------figureplot(log2_r,log2_C,'bo'); xlabel('log_2(r)'); ylabel('log_2(C(r))'); hold on;% 確定線性區域Linear = 1:length(log2_C);par = polyfit(log2_r(Linear),log2_C(Linear),1);Df = par(1) % 盒維數log2_C_estimate = polyval(par,log2_r(Linear),1);plot(log2_r(Linear),log2_C_estimate,'r-'); hold off;
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -