% 相空间重构
LAST_POINT = whlsl-m+1; %相点个数
for j=1:LAST_POINT
for k=1:m
Y(k,j)=whlsj(k+j-1);
end
end
% 求最大、最小和平均相点距离
max_d = 0.;
min_d = 1.0e+100;
avg_d = 0.;
for i = 1 : LAST_POINT-1
avg_dd = 0.;
for j = i+1 : LAST_POINT
d = 0.;
for k = 1 : m
d = d + (Y(k,i)-Y(k,j))*(Y(k,i)-Y(k,j));
end
d = sqrt(d);
if max_d < d
max_d = d;
end
if min_d > d
min_d = d;
end
avg_dd = avg_dd + d;
end
avg_dd = avg_dd/(LAST_POINT-i-1+1);
avg_d = avg_d + avg_dd;
end
avg_d = avg_d/(LAST_POINT-1);