Skip to content
Snippets Groups Projects
Commit 9383bd29 authored by marwan's avatar marwan
Browse files

bugfix in lmin check

adding note on Theiler window (regarding the calculation in crqa.m)
parent 34be2a9e
No related branches found
No related tags found
No related merge requests found
...@@ -5,6 +5,12 @@ function out=rpde(varargin) ...@@ -5,6 +5,12 @@ function out=rpde(varargin)
% recurrence time distribution of time series X, % recurrence time distribution of time series X,
% also known as recurrence period density entropy (RPDE). % also known as recurrence period density entropy (RPDE).
% %
% Note: In contrast to the calculation of RPDE here,
% in CRQA a Theiler window is applied to the RP
% by default, resulting in different RPDE values.
% For comparison, you should ensure that the
% Theiler window in CRQA is set to 0.
%
% Examples: a = sin(0:.1:80); % Examples: a = sin(0:.1:80);
% b = sin(0:.1:80) + .1 * randn(1,801); % b = sin(0:.1:80) + .1 * randn(1,801);
% rpde(a,3,15,.1) % rpde(a,3,15,.1)
...@@ -25,6 +31,9 @@ function out=rpde(varargin) ...@@ -25,6 +31,9 @@ function out=rpde(varargin)
% $Revision$ % $Revision$
% %
% $Log$ % $Log$
% Revision 5.2 2010/06/30 12:02:31 marwan
% Help text modified
%
% Revision 5.1 2010/06/21 10:56:20 marwan % Revision 5.1 2010/06/21 10:56:20 marwan
% initial submission % initial submission
% %
...@@ -36,7 +45,7 @@ global props ...@@ -36,7 +45,7 @@ global props
init_properties init_properties
lmin=1; lmin=1; % minimum length of white vertical lines to be considered
w=[]; method='max'; method_n=1; t=1; m=1; e=.1; w=[]; method='max'; method_n=1; t=1; m=1; e=.1;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% check the input %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% check the input
...@@ -191,7 +200,9 @@ X = crp(x,m,t,e,method,'sil'); ...@@ -191,7 +200,9 @@ X = crp(x,m,t,e,method,'sil');
% get recurrence times (in terms of vertical white lines in the RP) % get recurrence times (in terms of vertical white lines in the RP)
[dummy1 dummy2 w] = tt(X); [dummy1 dummy2 w] = tt(X);
w(w<=lmin) = []; w(w<lmin) = []; % if used with default lmin (=0),
% every white line will be considered, also
% such of length 1 (i.e. dots)
% get histogram (normalisation will be done in ENTROPY) % get histogram (normalisation will be done in ENTROPY)
h = histc(w,[0:max(w)]+.5); h = histc(w,[0:max(w)]+.5);
......
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