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
d0b07d2b
Commit
d0b07d2b
authored
16 years ago
by
marwan
Browse files
Options
Downloads
Patches
Plain Diff
levenshtein and DTW distance added
parent
295a494a
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
crp2.m
+36
-8
36 additions, 8 deletions
crp2.m
with
36 additions
and
8 deletions
crp2.m
+
36
−
8
View file @
d0b07d2b
...
...
@@ -67,7 +67,7 @@ function xout=crp2(varargin)
% b = sin(.01 * ([1:1000] * 2 * pi/67) .^2);
% crp2(b(1:500),a(1:700),3,10,.06,'fan')
%
% See also CRP, CRP_BIG, JRP and TRACKPLOT.
% See also CRP, CRP_BIG, JRP
, TAUCRP
and TRACKPLOT.
%
% References:
% Marwan, N., Thiel, M., Nowaczyk, N.:
...
...
@@ -82,6 +82,9 @@ function xout=crp2(varargin)
% $Revision$
%
% $Log$
% Revision 5.14 2007/07/18 17:18:44 marwan
% integer values in the arguments supported
%
% Revision 5.13 2007/05/15 17:33:13 marwan
% new neighbourhood criterion: fixed RR
%
...
...
@@ -176,7 +179,7 @@ set(0,'ShowHidden','On')
error
(
nargchk
(
1
,
9
,
nargin
));
if
nargout
>
1
,
error
(
'Too many output arguments'
),
end
check_meth
=
{
'ma'
,
'eu'
,
'mi'
,
'nr'
,
'rr'
,
'fa'
,
'in'
,
'om'
,
'op'
,
'di'
};
% maxnorm, euclidean, nrmnorm, fan, distance
check_meth
=
{
'ma'
,
'eu'
,
'mi'
,
'nr'
,
'rr'
,
'fa'
,
'in'
,
'om'
,
'op'
,
'
le'
,
'dt'
,
'
di'
};
% maxnorm, euclidean, nrmnorm, fan, distance
check_norm
=
{
'non'
,
'nor'
};
% nonormalize, normalize
check_gui
=
{
'gui'
,
'nog'
,
'sil'
};
% gui, nogui, silent
...
...
@@ -605,7 +608,7 @@ switch(action)
'Tag'
,
'Unthresh'
,
...
'ToolTip'
,
'Switch between thresholded and unthresholded CRP.'
);
if
method
==
1
0
,
set
(
h0
,
'Value'
,
1
);
end
if
method
==
1
2
,
set
(
h0
,
'Value'
,
1
);
end
if
method
==
8
|
method
==
9
,
set
(
h0
,
'Enable'
,
'Off'
);
end
h1
=
uicontrol
(
props
.
popup
,
...
% Button Unthresholded Scale
...
...
@@ -618,17 +621,17 @@ switch(action)
'Tag'
,
'Log'
,
...
'ToolTip'
,
'Switch between various scaled CRP.'
);
if
method
==
1
0
,
set
(
h1
,
'Enable'
,
'On'
);
end
if
method
==
1
2
,
set
(
h1
,
'Enable'
,
'On'
);
end
h2
=
uicontrol
(
props
.
popup
,
...
% Input Neighbourhood Method
'Units'
,
'Normalized'
,
...
'String'
,
'Maximum Norm|Euclidean Norm|Minimum Norm|Normalized Norm|Fixed RR|Fixed Amount|Interdependent|Order Matrix|Order Pattern'
,
...
'String'
,
'Maximum Norm|Euclidean Norm|Minimum Norm|Normalized Norm|Fixed RR|Fixed Amount|Interdependent|Order Matrix|Order Pattern
|Levenshtein|DTW
'
,
...
'Position'
,[
.
16
.
509
.
67
.
032
],
...
'CallBack'
,
'crp2 unthresh'
,
...
'Tag'
,
'Method'
,
...
'ToolTip'
,
'Select the method of finding neighbours.'
);
if
method
==
1
0
,
set
(
h2
,
'Enable'
,
'Off'
);
else
,
set
(
h2
,
'Value'
,
method
);
end
if
method
==
1
2
,
set
(
h2
,
'Enable'
,
'Off'
);
else
,
set
(
h2
,
'Value'
,
method
);
end
h0
=
uicontrol
(
props
.
text
,
...
% Text Threshold
'Units'
,
'Normalized'
,
...
...
...
@@ -637,7 +640,7 @@ switch(action)
'Position'
,[
.
16
.
462
.
35
.
02
]);
h1
=
get
(
h0
,
'Extent'
);
h2
=
get
(
h0
,
'Position'
);
set
(
h0
,
'Position'
,[
h2
(
1
)
h2
(
2
)
h2
(
3
)
h1
(
4
)])
if
method
==
1
0
|
method
==
9
,
set
(
h0
,
'Enable'
,
'Off'
);
end
if
method
==
1
2
|
method
==
9
,
set
(
h0
,
'Enable'
,
'Off'
);
end
h0
=
uicontrol
(
props
.
edit
,
...
% Input Threshold
...
...
@@ -649,7 +652,7 @@ switch(action)
'ToolTip'
,
'Insert the size of neighbourhood.'
);
h1
=
get
(
h0
,
'Extent'
);
h2
=
get
(
h0
,
'Position'
);
set
(
h0
,
'Position'
,[
h2
(
1
)
h2
(
2
)
h2
(
3
)
h1
(
4
)])
if
method
==
1
0
|
method
==
9
,
set
(
h0
,
'Enable'
,
'Off'
);
end
if
method
==
1
2
|
method
==
9
,
set
(
h0
,
'Enable'
,
'Off'
);
end
dark_factor
=.
86
;
h0
=
uicontrol
(
props
.
frame
,
'BackgroundColor'
,
dark_factor
*
props
.
frame
.
BackgroundColor
,
...
% Frame LOSsearch
...
...
@@ -1202,6 +1205,31 @@ switch(action)
matext
=
''
;
%%%%%%%%%%%%%%%%% Levenshtein
case
10
errcode
=
120
;
set
(
findobj
(
'Tag'
,
'Status'
,
'Parent'
,
findobj
(
'Parent'
,
hCRP
,
'Tag'
,
'CRPPlot'
)),
'String'
,
'Compute Distance Matrix'
),
drawnow
s1
=
levenshtein
(
x1
,
y1
);
X
=
reshape
(
s1
,
Ny
,
Nx
);
matext
=
''
;
%%%%%%%%%%%%%%%%% DTW
case
11
errcode
=
121
;
set
(
findobj
(
'Tag'
,
'Status'
,
'Parent'
,
findobj
(
'Parent'
,
hCRP
,
'Tag'
,
'CRPPlot'
)),
'String'
,
'Compute Distance Matrix'
),
drawnow
s1
=
dtw
(
x1
,
y1
);
X
=
reshape
(
s1
,
Ny
,
Nx
);
matext
=
''
;
%%%%%%%%%%%%%%%%% global CRP
case
length
(
check_meth
)
...
...
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