Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
CRP Toolbox for MATLAB
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Norbert Marwan
CRP Toolbox for MATLAB
Commits
fd6da128
Commit
fd6da128
authored
11 years ago
by
marwan
Browse files
Options
Downloads
Patches
Plain Diff
bug fix for sparse CRP matrices
lmin option added
parent
cfb4fcec
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
crqad.m
+25
-7
25 additions, 7 deletions
crqad.m
with
25 additions
and
7 deletions
crqad.m
+
25
−
7
View file @
fd6da128
...
@@ -11,11 +11,13 @@ function out=crqad(varargin)
...
@@ -11,11 +11,13 @@ function out=crqad(varargin)
% monotonically increasing, it will be used as an
% monotonically increasing, it will be used as an
% time scale for plotting.
% time scale for plotting.
%
%
% Y=CRQAD(X,M,T,E,W) computes the recurrence
% Y=CRQAD(X,M,T,E,W
,LMIN
) computes the recurrence
% quantification analysis of the recurrence plot
% quantification analysis of the recurrence plot
% of X by using the dimension M, delay T, the
% of X by using the dimension M, delay T, the
% size of neighbourhood E, for the diagonals within
% size of neighbourhood E, for the diagonals within
% the range [-W,W] around the main diagonal.
% the range [-W,W] around the main diagonal. Variable LMIN
% sets the minimal length of what should be considered
% to be a diagonal line.
%
%
% Parameters: dimension M, delay T, the size of
% Parameters: dimension M, delay T, the size of
% neighbourhood E and the range size W are the first
% neighbourhood E and the range size W are the first
...
@@ -75,6 +77,9 @@ function out=crqad(varargin)
...
@@ -75,6 +77,9 @@ function out=crqad(varargin)
% $Revision$
% $Revision$
%
%
% $Log$
% $Log$
% Revision 2.10 2010/06/30 12:03:02 marwan
% Help text modified
%
% Revision 2.9 2009/03/24 08:35:19 marwan
% Revision 2.9 2009/03/24 08:35:19 marwan
% corrected XCF calculation
% corrected XCF calculation
%
%
...
@@ -107,7 +112,7 @@ global props
...
@@ -107,7 +112,7 @@ global props
init_properties
init_properties
lmin
=
10
;
lmin
_default
=
2
;
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
...
@@ -193,13 +198,13 @@ splash_gpl('crp');
...
@@ -193,13 +198,13 @@ splash_gpl('crp');
if
~
isempty
(
varargin
{
i_double
(
3
)}),
t
=
varargin
{
i_double
(
3
)}(
1
);
else
t
=
1
;
end
if
~
isempty
(
varargin
{
i_double
(
3
)}),
t
=
varargin
{
i_double
(
3
)}(
1
);
else
t
=
1
;
end
if
~
isempty
(
varargin
{
i_double
(
4
)}),
e
=
varargin
{
i_double
(
4
)}(
1
);
else
e
=.
1
;
end
if
~
isempty
(
varargin
{
i_double
(
4
)}),
e
=
varargin
{
i_double
(
4
)}(
1
);
else
e
=.
1
;
end
if
~
isempty
(
varargin
{
i_double
(
5
)}),
w
=
varargin
{
i_double
(
5
)}(
1
);
else
w
=
varargin
{
i_double
(
5
)};
end
if
~
isempty
(
varargin
{
i_double
(
5
)}),
w
=
varargin
{
i_double
(
5
)}(
1
);
else
w
=
varargin
{
i_double
(
5
)};
end
%
if ~isempty(varargin{i_double(6)}),
wstep
=varargin{i_double(6)}(1); else
wstep=1
; end
if
~
isempty
(
varargin
{
i_double
(
6
)}),
lmin
=
varargin
{
i_double
(
6
)}(
1
);
else
lmin
=
lmin_default
;
end
else
else
if
~
isempty
(
varargin
{
i_double
(
3
)}),
m
=
varargin
{
i_double
(
3
)}(
1
);
else
m
=
1
;
end
if
~
isempty
(
varargin
{
i_double
(
3
)}),
m
=
varargin
{
i_double
(
3
)}(
1
);
else
m
=
1
;
end
if
~
isempty
(
varargin
{
i_double
(
4
)}),
t
=
varargin
{
i_double
(
4
)}(
1
);
else
t
=
1
;
end
if
~
isempty
(
varargin
{
i_double
(
4
)}),
t
=
varargin
{
i_double
(
4
)}(
1
);
else
t
=
1
;
end
if
~
isempty
(
varargin
{
i_double
(
5
)}),
e
=
varargin
{
i_double
(
5
)}(
1
);
else
e
=.
1
;
end
if
~
isempty
(
varargin
{
i_double
(
5
)}),
e
=
varargin
{
i_double
(
5
)}(
1
);
else
e
=.
1
;
end
if
~
isempty
(
varargin
{
i_double
(
6
)}),
w
=
varargin
{
i_double
(
6
)}(
1
);
else
w
=
varargin
{
i_double
(
6
)};
end
if
~
isempty
(
varargin
{
i_double
(
6
)}),
w
=
varargin
{
i_double
(
6
)}(
1
);
else
w
=
varargin
{
i_double
(
6
)};
end
%
if ~isempty(varargin{i_double(7)}),
wstep
=varargin{i_double(7)}(1); else
wstep=1
; end
if
~
isempty
(
varargin
{
i_double
(
7
)}),
lmin
=
varargin
{
i_double
(
7
)}(
1
);
else
lmin
=
lmin_default
;
end
end
end
else
else
error
(
'No valid arguments.'
)
error
(
'No valid arguments.'
)
...
@@ -291,8 +296,21 @@ for j=-w:w, clear z z0 z1
...
@@ -291,8 +296,21 @@ for j=-w:w, clear z z0 z1
if
sum
(
x4
(:,
N
(
2
)
+
1
+
j
))
==
N
(
2
),
l1
=
N
(
2
);
else
if
sum
(
x4
(:,
N
(
2
)
+
1
+
j
))
==
N
(
2
),
l1
=
N
(
2
);
else
z
=
diff
(
x4
(:,
N
(
2
)
+
1
+
j
));
z
=
diff
(
x4
(:,
N
(
2
)
+
1
+
j
));
if
~
isempty
(
find
(
~
(
z
-
1
))),
z0
(:,
1
)
=
find
(
~
(
z
-
1
));
else
,
z0
(
1
:
N
(
2
))
=
0
;
end
,
if
~
isempty
(
find
(
~
(
z
-
1
)))
&
any
(
~
(
z
-
1
))
if
~
isempty
(
find
(
~
(
z
+
1
))),
z1
=
find
(
~
(
z
+
1
));
else
,
z1
(
1
:
N
(
2
))
=
0
;
end
z0
(:,
1
)
=
find
(
~
(
z
-
1
));
else
z0
(
1
:
N
(
2
))
=
0
;
end
if
~
isempty
(
find
(
~
(
z
+
1
)))
&
any
(
~
(
z
+
1
))
z1
=
find
(
~
(
z
+
1
));
else
z1
(
1
:
N
(
2
))
=
0
;
end
% some brutforce corrections
adjustlength
=
min
(
length
(
z0
),
length
(
z1
));
z0
=
z0
(
1
:
adjustlength
);
z1
=
z1
(
1
:
adjustlength
);
if
z0
(
1
)
>
z1
(
1
)
if
z0
(
1
)
>
z1
(
1
)
z0
(
2
:
end
+
1
,
1
)
=
z0
(
1
:
end
);
z0
(
1
)
=
0
;
z0
(
2
:
end
+
1
,
1
)
=
z0
(
1
:
end
);
z0
(
1
)
=
0
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment