多重分行的Qcc检验程 x1 = load('C:\Users\user\Desktop\RMB.txt');
x2 = load('C:\Users\user\Desktop\SSCI.txt');
N=length(x1);
m_max= 1000; % 给定卡方分布自由度 degree of freedom
v = 0;
xx = 0;
Qcc = zeros( m_max,1);
sum1 = sum(x1.^2)*sum(x2.^2);
for m =1 : m_max
for i = 1:m
for k = i+1:N
v = v + x1(k)*x2(k-i);
end
xx = xx + (v^2/sum1)/(N-i);
end
Qcc(m)= (N^2)*xx;
end
d = zeros(m_max,1);
y = zeros(m_max,1);
for m = 1: m_max
d(m) = m;
y(m) = icdf('chi2',0.95,m); %自由度为m,显著性水平为0.05(概率为0.95)的卡方统计量值
end
plot(log(d),log(y),log(d),log(Qcc));
序,使用过的!
2019-12-21 21:28:35
652B
多重分形
1