-
Notifications
You must be signed in to change notification settings - Fork 2
/
dogfitfig.m
292 lines (224 loc) · 11.9 KB
/
dogfitfig.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
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
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
function varargout = dogfitfig(varargin)
% DOGFITFIG Application M-file for dogfitfig.fig
% FIG = DOGFITFIG launch dogfitfig GUI.
% DOGFITFIG('callback_name', ...) invoke the named callback.
% Last Modified by GUIDE v2.5 29-Sep-2011 16:29:16
if nargin == 0 % LAUNCH GUI
fig = openfig(mfilename,'reuse');
% Generate a structure of handles to pass to callbacks, and store it.
handles = guihandles(fig);
guidata(fig, handles);
if nargout > 0
varargout{1} = fig;
end
elseif ischar(varargin{1}) % INVOKE NAMED SUBFUNCTION OR CALLBACK
try
[varargout{1:nargout}] = feval(varargin{:}); % FEVAL switchyard
catch
s=lasterror;
disp(s.message);
for i=1:length(s.stack)
disp(s.stack(i));
end
end
end
%| ABOUT CALLBACKS:
%| GUIDE automatically appends subfunction prototypes to this file, and
%| sets objects' callback properties to call them through the FEVAL
%| switchyard above. This comment describes that mechanism.
%|
%| Each callback subfunction declaration has the following form:
%| <SUBFUNCTION_NAME>(H, EVENTDATA, HANDLES, VARARGIN)
%|
%| The subfunction name is composed using the object's Tag and the
%| callback type separated by '_', e.g. 'slider2_Callback',
%| 'figure1_CloseRequestFcn', 'axis1_ButtondownFcn'.
%|
%| H is the callback object's handle (obtained using GCBO).
%|
%| EVENTDATA is empty, but reserved for future use.
%|
%| HANDLES is a structure containing handles of components in GUI using
%| tags as fieldnames, e.g. handles.figure1, handles.slider2. This
%| structure is created at GUI startup using GUIHANDLES and stored in
%| the figure's application data using GUIDATA. A copy of the structure
%| is passed to each callback. You can store additional information in
%| this structure at GUI startup, and you can change the structure
%| during callbacks. Call guidata(h, handles) after changing your
%| copy to replace the stored original so that subsequent callbacks see
%| the updates. Type "help guihandles" and "help guidata" for more
%| information.
%|
%| VARARGIN contains any extra arguments you have passed to the
%| callback. Specify the extra arguments by editing the callback
%| property in the inspector. By default, GUIDE sets the property to:
%| <MFILENAME>('<SUBFUNCTION_NAME>', gcbo, [], guidata(gcbo))
%| Add any extra arguments after the last argument, before the final
%| closing parenthesis.
% --------------------------------------------------------------------
function varargout = ConstrainBox_Callback(h, eventdata, handles, varargin)
% Stub for Callback of the uicontrol handles.checkbox1.
if get(gcbo,'Value')==1;
set(handles.bound,'Enable','on');
else
set(handles.bound,'Enable','off');
end
% --------------------------------------------------------------------
function varargout = ImportButton_Callback(h, eventdata, handles, varargin)
% Stub for Callback of the uicontrol handles.ImportButton.
dogfit('Import')
% --------------------------------------------------------------------
function varargout = LoadButton_Callback(h, eventdata, handles, varargin)
% Stub for Callback of the uicontrol handles.LoadButton.
dogfit('Load Data')
% --------------------------------------------------------------------
function varargout = DFDisplayMenu_Callback(h, eventdata, handles, varargin)
% Stub for Callback of the uicontrol handles.DFDisplayMenu.
% --------------------------------------------------------------------
function varargout = DFSmooth_Callback(h, eventdata, handles, varargin)
% Stub for Callback of the uicontrol handles.DFSmooth.
if get(handles.DFSmooth,'Value')==1
set(handles.DFSmoothMenu,'Enable','on')
else
set(handles.DFSmoothMenu,'Enable','off')
end
% --------------------------------------------------------------------
function varargout = Surround_Callback(h, eventdata, handles, varargin)
% Stub for Callback of the uicontrol handles.Surround.
% --------------------------------------------------------------------
function varargout = DFAlgorithm_Callback(h, eventdata, handles, varargin)
% Stub for Callback of the uicontrol handles.DFAlgorithm.
% --------------------------------------------------------------------
function varargout = caedit_Callback(h, eventdata, handles, varargin)
dogfit('RePlot')
% --------------------------------------------------------------------
function varargout = csedit_Callback(h, eventdata, handles, varargin)
dogfit('RePlot')
% --------------------------------------------------------------------
function varargout = saedit_Callback(h, eventdata, handles, varargin)
dogfit('RePlot')
% --------------------------------------------------------------------
function varargout = ssedit_Callback(h, eventdata, handles, varargin)
dogfit('RePlot')
% --------------------------------------------------------------------
function varargout = dcedit_Callback(h, eventdata, handles, varargin)
dogfit('RePlot')
% --------------------------------------------------------------------
function varargout = sedit_Callback(h, eventdata, handles, varargin)
dogfit('RePlot')
% --------------------------------------------------------------------
function varargout = SaveButton_Callback(h, eventdata, handles, varargin)
% Stub for Callback of the uicontrol handles.SaveButton.
dogfit('Save Data')
% --------------------------------------------------------------------
function varargout = FitItButton_Callback(h, eventdata, handles, varargin)
% Stub for Callback of the uicontrol handles.FitItButton.
dogfit('FitIt')
% --------------------------------------------------------------------
function varargout = ExitButton_Callback(h, eventdata, handles, varargin)
% Stub for Callback of the uicontrol handles.ExitButton.
dogfit('Exit')
% --------------------------------------------------------------------
function varargout = DFSmoothMenu_Callback(h, eventdata, handles, varargin)
% Stub for Callback of the uicontrol handles.DFSmoothMenu.
% --------------------------------------------------------------------
function varargout = SpawnButton_Callback(h, eventdata, handles, varargin)
% Stub for Callback of the uicontrol handles.SpawnButton.
dogfit('Spawn')
% --------------------------------------------------------------------
function varargout = InfoText_ButtondownFcn(h, eventdata, handles, varargin)
% Stub for ButtondownFcn of the uicontrol handles.InfoText.
dogfit('Save Text')
% --------------------------------------------------------------------
function varargout = InfoText_Callback(h, eventdata, handles, varargin)
% Stub for Callback of the uicontrol handles.InfoText.
dogfit('Save Text')
% --------------------------------------------------------------------
function varargout = ub1_Callback(h, eventdata, handles, varargin)
% --------------------------------------------------------------------
function varargout = ub2_Callback(h, eventdata, handles, varargin)
% --------------------------------------------------------------------
function varargout = ub3_Callback(h, eventdata, handles, varargin)
% --------------------------------------------------------------------
function varargout = ub4_Callback(h, eventdata, handles, varargin)
% --------------------------------------------------------------------
function varargout = ubdc_Callback(h, eventdata, handles, varargin)
% --------------------------------------------------------------------
function varargout = ubs_Callback(h, eventdata, handles, varargin)
% --------------------------------------------------------------------
function varargout = lb1_Callback(h, eventdata, handles, varargin)
% --------------------------------------------------------------------
function varargout = lb2_Callback(h, eventdata, handles, varargin)
% --------------------------------------------------------------------
function varargout = lb3_Callback(h, eventdata, handles, varargin)
% --------------------------------------------------------------------
function varargout = lb4_Callback(h, eventdata, handles, varargin)
% --------------------------------------------------------------------
function varargout = lbdc_Callback(h, eventdata, handles, varargin)
% --------------------------------------------------------------------
function varargout = lbs_Callback(h, eventdata, handles, varargin)
% --- Executes on button press in DFUsenlinfit.
function DFUsenlinfit_Callback(hObject, eventdata, handles)
% hObject handle to DFUsenlinfit (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hint: get(hObject,'Value') returns toggle state of DFUsenlinfit
function DFSmoothNumber_Callback(hObject, eventdata, handles)
% hObject handle to DFSmoothNumber (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,'String') returns contents of DFSmoothNumber as text
% str2double(get(hObject,'String')) returns contents of DFSmoothNumber as a double
% --- Executes on button press in DFUseROG.
function DFUseROG_Callback(hObject, eventdata, handles)
% hObject handle to DFUseROG (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hint: get(hObject,'Value') returns toggle state of DFUseROG
v = get(hObject,'Value');
if v == 1
set(handles.DFUseCHF,'Value',0);
end
% --- Executes on button press in DFUseCHF.
function DFUseCHF_Callback(hObject, eventdata, handles)
% hObject handle to DFUseCHF (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hint: get(hObject,'Value') returns toggle state of DFUseCHF
v = get(hObject,'Value');
if v == 1
set(handles.DFUseROG,'Value',0);
set(handles.DFSmooth,'Value',0);
end
% --- Executes on selection change in DFHistory.
function DFHistory_Callback(hObject, eventdata, handles)
% hObject handle to DFHistory (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: contents = cellstr(get(hObject,'String')) returns DFHistory contents as cell array
% contents{get(hObject,'Value')} returns selected item from DFHistory
dogfit('DFHistory')
function DFTolX_Callback(hObject, eventdata, handles)
% hObject handle to DFTolX (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,'String') returns contents of DFTolX as text
% str2double(get(hObject,'String')) returns contents of DFTolX as a double
function DFMaxFunEvals_Callback(hObject, eventdata, handles)
% hObject handle to DFMaxFunEvals (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,'String') returns contents of DFMaxFunEvals as text
% str2double(get(hObject,'String')) returns contents of DFMaxFunEvals as a double
function DFMaxIter_Callback(hObject, eventdata, handles)
% hObject handle to DFMaxIter (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,'String') returns contents of DFMaxIter as text
% str2double(get(hObject,'String')) returns contents of DFMaxIter as a double
function DFTolCon_Callback(hObject, eventdata, handles)
% hObject handle to DFTolCon (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,'String') returns contents of DFTolCon as text
% str2double(get(hObject,'String')) returns contents of DFTolCon as a double