Newer
Older
function h_axes=create_Ctrlfig(programme,h,ds,m,t,e,method)
% create_Ctrlfig Creates the Control figure for the CRP Toolbox
% Used by CRP Toolbox
% Copyright (c) 1998-2004 by AMRON
% Norbert Marwan, Potsdam University, Germany
% http://www.agnld.uni-potsdam.de
%
% $Date$
% $Revision$
%
% $Log$
% Revision 4.8 2004/11/11 12:17:55 marwan
% order patterns recurrence plot added
%
% Revision 4.7 2004/11/10 07:04:29 marwan
% initial import
%
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
%
% This program is free software; you can redistribute it and/or
% modify it under the terms of the GNU General Public License
% as published by the Free Software Foundation; either version 2
% of the License, or any later version.
global props
scr=get(0,'ScreenSize');
h9=figure('Tag','CRPFig',... % Control Figure
'Position',[5*scr(3)/8+10 scr(4)/8 1*scr(3)/6 3*scr(4)/4 ],...
'Color',props.window.Color,...
'NumberTitle','off',...
'Name',['Control (' h ')'],...
'MenuBar','None',...
'DeleteFcn',[programme,' handlevisON'],...
'BusyAction','cancel',...
'Resize','Off');
set(h9,props.window,'Units','Norm')
h0=uicontrol(props.frame, ... % Frame Embedding
'Units','Normalized',...
'Position',[.1 .525 .8 .445]);
h0=uicontrol(props.text,... % Text Embedding
'Units','Normalized', ...
'FontAngle','italic', ...
'Position',[.12 .939 .6 .02], ...
'String','Embedding');
h1=get(h0,'Extent'); h2=get(h0,'Position'); set(h0,'Position',[h2(1) h2(2) h1(3) h1(4)])
h0=uicontrol(props.text,... % Text Dimension
'Units','Normalized',...
'Tag','Dimtext',...
'String','Dimension:',...
'Position',[.16 .895 .35 .02]);
h1=get(h0,'Extent'); h2=get(h0,'Position'); set(h0,'Position',[h2(1) h2(2) h2(3) h1(4)])
if method==7, set(h0,'Enable','Off'); end
h0=uicontrol(props.popup,... % Input Dimension
'Units','Normalized',...
'Tag','Dim',...
'String','1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20',...
'Position',[.58 .9 .249 .026], ...
'Value',m,...
'UserData', ds,...
'Callback',[programme,' fitdim'],...
'ToolTip','Select the embedding dimension.');
h1=get(h0,'Extent'); h2=get(h0,'Position'); set(h0,'Position',[h2(1) h2(2) h2(3) h1(4)])
if method==7, set(h0,'Enable','Off'); end
h0=uicontrol(props.text,... % Text Delay
'Units','Normalized',...
'Tag','Delaytext',...
'String','Delay:',...
'Position',[.16 .847 .35 .02]);
h1=get(h0,'Extent'); h2=get(h0,'Position'); set(h0,'Position',[h2(1) h2(2) h2(3) h1(4)])
if method==7, set(h0,'Enable','Off'); end
h0=uicontrol(props.edit,... % Input Delay
'Units','Normalized',...
'Tag','Delay',...
'String',t,...
'Position',[.58 .85 .249 .026],...
'ToolTip','Insert the embedding delay time.');
h1=get(h0,'Extent'); h2=get(h0,'Position'); set(h0,'Position',[h2(1) h2(2) h2(3) h1(4)])
if method==7, set(h0,'Enable','Off'); end
h0=uicontrol(props.text,... % Text Vector Switching
'Units','Normalized',...
'String','Vector Switching:',...
'Position',[.16 .8 .6 .02]);
h1=get(h0,'Extent'); h2=get(h0,'Position'); set(h0,'Position',[h2(1) h2(2) h2(3) h1(4)])
for i=1:5, for j=1:4 % Input Vector Switching
h0 = uicontrol(props.button,...
'Units','normalized', ...
'Callback',[programme,' vectorswitch'], ...
'Position',[.18+(j-1)*0.167 0.765-(i-1)*0.034 .14 0.028], ...
'String',(i-1)*4+j, ...
'ToolTip','Switch this vector.',...
'Tag',['DimShift' num2str((i-1)*4+j)]);
h1=get(h0,'Extent'); h2=get(h0,'Position'); set(h0,'Position',[h2(1) h2(2) h2(3) h1(4)])
end, end
for i=1:20
if i>m, set(findobj('Tag',['DimShift' num2str(i)]), 'Enable', 'off');
else, set(findobj('Tag',['DimShift' num2str(i)]), 'Enable', 'on'); end
end
h0=uicontrol(props.text,... % Text Copyright
'Units','Normalized',...
'HorizontalAlignment','center',...
'Position',[.15 .534 .7 .06]);
h2=textwrap(h0,{' AGNLD','University of Potsdam','1998-2005'});
set(h0,'String',h2)
h1=get(h0,'Extent'); h2=get(h0,'Position'); set(h0,'Position',[h2(1) h2(2) h2(3) h1(4)])
h0=uicontrol(props.frame, ... % Frame Neighbourhood
'Units','Normalized',...
'Position',[.1 .279 .8 .22]);
h0=uicontrol(props.text,... % Text Neighbourhood
'Units','Normalized',...
'FontAngle','italic', ...
'String','Neighbourhood',...
'Position',[.12 .466 .6 .02]);
h1=get(h0,'Extent'); h2=get(h0,'Position'); set(h0,'Position',[h2(1) h2(2) h1(3) h1(4)])
h0=uicontrol(props.checkbox, ... % Button Unthresholded
'Units','Normalized',...
'Position',[.16 .415 .51 .032], ...
'String','Unthresholded', ...
'CallBack',[programme,' unthresh'],...
'Tag','Unthresh',...
'ToolTip','Switch between thresholded and unthresholded CRP.' );
if method==9, set(h0,'Value',1); end
if method==7 | method==8, set(h0,'Enable','Off'); end
h1=uicontrol(props.popup, ... % Button Unthresholded Scale
'Units','Normalized',...
'Position',[.69 .415 .14 .032], ...
'String','1|1/2|1/4|1/6|1/8', ...
'Value',1,...
'CallBack',[programme,' log'],...
'Enable','off',...
'Tag','Log',...
'ToolTip','Switch between various scaled CRP.' );
h2=uicontrol(props.popup,... % Input Neighbourhood Method
'Units','Normalized',...
'String','Maximum Norm|Euclidean Norm|Minimum Norm|Normalized Norm|Fixed Amount|Interdependent|Order Matrix|Order Pattern',...
'Position',[.16 .363 .67 .032],...
'Tag','Method',...
'CallBack',[programme,' unthresh'],...
'ToolTip','Select the method of finding neighbours.');
if method==9, set(h2,'Enable','Off'); else, set(h2,'Value',method); end
h0=uicontrol(props.text,... % Text Threshold
'Units','Normalized',...
'Tag','Sizetext',...
'String','Threshold:',...
'Position',[.16 .311 .35 .02]);
h1=get(h0,'Extent'); h2=get(h0,'Position'); set(h0,'Position',[h2(1) h2(2) h2(3) h1(4)])
if method==9 | method==8, set(h0,'Enable','Off'); end
h0=uicontrol(props.edit,... % Input Threshold
'Units','Normalized',...
'Tag','Size',...
'Position',[.58 .315 .249 .026],...
'String',e,...
'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==9 | method==8, set(h0,'Enable','Off'); end
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
if ~isunix
h0=uicontrol(props.frame, ... % Frame Embedding
'Units','Normalized',...
'Position',[.1 .21 .8 .045]);
end
h0=uicontrol(props.checkbox, ... % Checkbox Stretch Plot
'Units','Normalized',...
'Position',[.1 .21 .8 .045], ...
'String','Streched Plot', ...
'Tag','Stretch',...
'CallBack',[programme,' stretch'],...
'Value',1,...
'ToolTip','Streches the plotted CRP to a squared plot.' );
h0=uicontrol(props.button, ... % Button Store Matrix
'Units','Normalized',...
'Position',[.1 .15 .38 .045], ...
'String','Store Matrix', ...
'Tag','Store',...
'CallBack',[programme,' store'],...
'Value',1,...
'ToolTip','Stores the CRP matrix into variable X in the workspace.' );
h0=uicontrol(props.button,... % Button Help
'Units','Normalized',...
'String','Help',...
'Position',[.52 .15 .38 .045],...
'Tag','Help',...
'Callback',['helpwin ',programme],...
'ToolTip','Opens the helpwindow.');
h0=uicontrol(props.button,... % Button Apply
'Units','Normalized',...
'String','Apply',...
'Position',[.1 .09 .8 .045],...
'Tag','Apply',...
'Callback',[programme,' compute'],...
'ToolTip','Starts the computation - be patient.');
h0=uicontrol(props.button,... % Button Close
'Units','Normalized',...
'String','Close',...
'Position',[.1 .03 .8 .045],...
'Tag','Close',...
'BusyAction','cancel',...
'Callback',[programme,' close'],...
'ToolTip','Closes CRP windows.');
set(h9, 'HandleVis','CallBack')