?? lzparse.m
字號:
% This m-file is called LZparse.m
%It accomplishes Lempel-Ziv parsingof a binary datavector
% x is a binary datavector.
% y=LZparse(x) is a vector consisting of the indices of the
% blocks in the Lempel-Ziv parsing of x.
function y=LZparse(x)
N=length(x);
dict=[];
lengthdict=0;
while lengthdict<N
i=lengthdict+1;
k=0;
while k==0
v=x(lengthdict+1:i);
j=bitstring_to_index(v);
A=(dict~=j);
k=prod(real(A));
if i==N
k=1;
else
end
i=i+1;
end
dict=[dict j];
lengthdict=lengthdict+length(v);
end
y=dict;
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -