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
50a886d4
Commit
50a886d4
authored
19 years ago
by
marwan
Browse files
Options
Downloads
Patches
Plain Diff
several small bug fixes which improves the precision
parent
076491ba
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
crqa.m
+21
-10
21 additions, 10 deletions
crqa.m
with
21 additions
and
10 deletions
crqa.m
+
21
−
10
View file @
50a886d4
...
...
@@ -135,6 +135,9 @@ function xout=crqa(varargin)
% $Revision$
%
% $Log$
% Revision 5.13 2005/04/01 12:19:51 marwan
% bug in minimal length for diagonal and vertical lines fixed
%
% Revision 5.12 2005/03/16 13:16:12 marwan
% bug in output fixed (same time scales for all sub-plots)
%
...
...
@@ -934,25 +937,32 @@ catch
if
nogui
~=
2
&
ishandle
(
hw
),
close
(
hw
),
end
end
N
=
size
(
X
);
if
theiler_window
>
0
X_theiler
=
double
(
triu
(
X
,
theiler_window
))
+
double
(
tril
(
X
,
-
theiler_window
));
else
X_theiler
=
X
;
end
% compute recurrence times of 1st and 2nd type
errcode
=
20
;
t1
=
[
0
];
t2
=
[];
for
i2
=
1
:
size
(
X
,
2
)
rps2
=
find
(
diff
(
double
(
X
(:,
i2
)))
==
1
);
rps
=
find
(
X
(:,
i2
));
for
i2
=
1
:
size
(
X_theiler
,
2
)
if
(
Nx
-
w
<
2
),
waitbar
(
i2
/
size
(
X_theiler
,
2
)),
end
rps2
=
find
(
diff
(
double
(
X_theiler
(:,
i2
)))
==
1
);
rps
=
find
(
X_theiler
(:,
i2
));
t1
=
[
t1
;
diff
(
rps
)];
t2
=
[
t2
;
diff
(
rps2
)];
end
t1
=
mean
(
t1
);
t2
=
mean
(
t2
);
N
=
size
(
X
);
X_theiler
=
double
(
triu
(
X
,
theiler_window
))
+
double
(
tril
(
X
,
-
theiler_window
));
[
a
b
]
=
dl
(
X_theiler
);
warning
off
errcode
=
201
;
b
(
find
(
b
<
lmin
))
=
[];
[
c
d
]
=
tt
(
X
);
[
c
d
]
=
tt
(
X
_theiler
);
warning
off
errcode
=
202
;
d
(
find
(
d
<
vmin
))
=
[];
...
...
@@ -960,7 +970,7 @@ d(find(d<vmin))=[];
errcode
=
203
;
RR
=
sum
(
X_theiler
(:))/(
N
(
1
)
*
N
(
2
));
%b(find(b>=max(N)-lmin))=[]; if isempty(b), b=0; end
b
(
find
(
b
>=
max
(
N
)))
=
[];
if
isempty
(
b
),
b
=
0
;
end
if
isempty
(
b
),
b
=
0
;
end
errcode
=
204
;
if
sum
(
sum
(
X_theiler
))
>
0
DET
=
sum
(
b
)/
sum
(
sum
(
X_theiler
));
...
...
@@ -969,14 +979,15 @@ else
end
errcode
=
205
;
L
=
mean
(
b
);
histL
=
hist
(
b
(:));
histL
=
hist
(
b
(:)
,[
1
:
min
(
N
)]
);
ENTR
=
entropy
(
histL
(:));
errcode
=
206
;
if
sum
(
d
)
>
0
LAM
=
sum
(
d
)/
sum
(
sum
(
X
));
LAM
=
sum
(
d
)/
sum
(
sum
(
X
_theiler
));
else
LAM
=
NaN
;
end
errcode
=
207
;
TT
=
mean
(
d
);
b
=
[
b
;
0
];
Lmax
=
max
(
b
);
...
...
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