资源简介
多重分行的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));
序,使用过的!
代码片段和文件信息
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_max1);
sum1 = sum(x1.^2)*sum(x2.^2);
for m =1 : m_max
for i = 1:m
for k = i+1:N
v = v + x1(
- 上一篇:清洁机器人路径规划matlab仿真程序
- 下一篇:MATLAB课设学生成绩管理系统
评论
共有 条评论