?? complexity.m
字號:
function cmp=complexity(x,n);% cmp = complexity(x,n);%% calculate the Lempel-Ziv complexity of the n-bit encoding of x. %% cmp is the normalised complexity, that is the number of distinct% symbol sequences in x, divided by the expected number of distinct % symbols for a noise sequence.%% Algorithm is implemented in complexitybs.c%% M. Small% ensmall@polyu.edu.hk% 7/10/04if nargin<2, n=2;end;if length(n)>1, for ni=1:length(n), cmp(ni)=complexity(x,n(ni)); end; else, %do the binning, with equi-probably bins x=x(:); nx=length(x); [xn,xi]=sort(x); y=zeros(nx,1); y=1:nx; y=floor(y.*(n/(nx+1))); x(xi)=y; %compute complexity with complexitybs cmp=complexitybs(x+eps);end;
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -