logistic自相关检测
clc
clearvars;
T=10000
x=zeros(1,T);
x(1)=0.98;
for n=1:(T-1)
x(n+1)=4*x(n)*(1-x(n));
end
p=(x>0.5);
n=-(x<=0.5);
H1=p+n;
% sum(p+n,'all')
% sum(x,'all')
t=-T+1:T-1;
N=2*T-1;
Rh1=zeros(1,N); %自相关函数
Rh2=zeros(1,N);
for j=0:T-1
Rh1(T+j)=sum(H1.*[H1(j+1:T) H1(1:j)])/T;
end
Rh1(1:T-1)=Rh1(N:-1:T+1);
plot(t,Rh1);