correlation_int.m

来自「这个是在进行混沌时间序列分析时的C-C算法的matlab程序」· M 代码 · 共 23 行

M
23
字号
function C_I=correlation_int(X,M,m,r)
%the function is used to calculate correlation integral
%C_I:the value of the correlation integral
%X:the reconstituted state space,M is a m*M matrix
%m:the embedding demention
%M:M is the number of embedded points in m-dimensional sapce
%r:the radius of the Heaviside function,sigma/2<r<2sigma
%calculate the sum of all the values of Heaviside
%skyhawk
sum_H=0;
for i=1:M
%     fprintf('%d/%d\n',i,M);
    for j=(i+1):M
        for nn=1:m
            Z(nn)=X(nn,i)-X(nn,j);
        end
        d=norm(Z,inf);
        %d=norm((X(:,i)-X(:,j)),inf);%calculat the distances of each two points in matris M with sup-norm
        sita=heaviside(r,d);%calculate the value of the heaviside function
        sum_H=sum_H+sita;
    end
end
C_I=2*sum_H/(M*(M-1));%the value of correlation integral

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?