Skip to content
Snippets Groups Projects
Commit 063f74de authored by marwan's avatar marwan
Browse files

minor bug: different lengths of vectors z0 and z1

parent 0b9cf6d8
No related branches found
No related tags found
No related merge requests found
......@@ -51,9 +51,9 @@ function out=crqad_big(varargin)
% Y.Lp = Lp
% Y.Lm = Lm
%
% Examples: a = sin(0:.1:80) + randn(1,801);
% b = sin(0:.1:80) + randn(1,801);
% crqad_big(a,b,3,15,.1,100,'fan')
% Examples: a = sin(0:.1:800) + randn(1,8001);
% b = sin(0:.1:800) + randn(1,8001);
% crqad_big(a,b,3,15,.1,100,'euc')
%
% See also CRQA, CRQAD, CRP, CRP2, CRP_BIG, DL, TT.
%
......@@ -71,6 +71,9 @@ function out=crqad_big(varargin)
% $Revision$
%
% $Log$
% Revision 5.1 2006/10/09 07:49:03 marwan
% initial check in
%
%
%
% This program is part of the new generation XXII series.
......@@ -334,12 +337,14 @@ clear z z0 z1
z=diff(X); z0 = [];
if ~isempty(find(~(z-1))),z0(:,1)=find(~(z-1));else,z0(1:length(X))=0;end,
if ~isempty(find(~(z+1))),z1=find(~(z+1));else,z1(1:length(X))=0;end
z1 = z1(:); z0 = z0(:);
if z0(1)>z1(1)
z0(2:end+1,1)=z0(1:end);z0(1)=0;
end
if length(z0)>length(z1), z0(end)=[]; end
l=sort(z1-z0); l1=l(find(l>lmin));
l=sort(z1-z0);
l1=l(find(l>lmin));
end
DET(w-j+1)=sum(l1)/sum(X);
L(w-j+1)=mean(l1);
......@@ -489,6 +494,8 @@ clear z z0 z1
if z0(1)>z1(1)
z0(2:end+1,1)=z0(1:end);z0(1)=0;
end
z1 = z1(:); z0 = z0(:);
if length(z0)>length(z1), z0(end)=[]; end
l=sort(z1-z0); l1=l(find(l>lmin));
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment