|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?我要加入
x
下面这个程序是我从网上搜到的,红色字体的那个函数我却搞不懂,有哪位高手知道,告诉一下,谢谢哈!
clc
clear
close all
%---------------------------------------------------
load('jd1_infor1.mat');
X=jd1_infor1;
%-----------------------------------------------------------------------
% 参数初始化
maxLags = 100;
m_vector = 2:5;
sigma = std(X);
r_vector = sigma/2*[1:4];
S_mean = zeros(1,maxLags);
Sj = zeros(1,length(r_vector));
delta_S_mean = zeros(1,maxLags);
delta_S = zeros(length(m_vector),maxLags);
%-----------------------------------------------------------------------
% 原C-C方法
for t = 1:maxLags
% t
temp = 0;
for i = 1:length(m_vector)
for j = 1:length(r_vector)
m = m_vector(i);
r = r_vector(j);
S = ccFunction(m,X,r,t); % 文献中的标准算法 - 计算S2(m,N,r,t)
temp = temp + S;
Sj(j) = S;
end
delta_S(i,t) = max(Sj)-min(Sj);
end
% 参见 <<混沌时间序列分析及应用>> P69 式(3.31)
S_mean(t) = temp/(length(m_vector)*length(r_vector));
delta_S_mean = mean(delta_S);
end
S_cor = delta_S_mean + abs(S_mean);
S2_mean = S_mean;
delta_S2_mean = delta_S_mean;
S2_cor = S_cor; |
|