-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathsetARMAopts.m
561 lines (520 loc) · 20.9 KB
/
setARMAopts.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
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
function setARMAopts(ARMAopts,pltLaunch)
% create secondary window to query the user for options related to ARMA despiking
% called from MITT
% calls DefaultARMAopts, subSetValues, subGetValues and various
% subfunctions
%% get ARMAopts if an empty variable is passed from MITT
% if ARMAopts is empty
if isempty(ARMAopts)
% get the default values
ARMAopts = DefaultARMAopts;
end
%% create figure
% create interactive figure
[pltARMA,axe] = CreatepltARMA;
% add buttons to figure and save the handles as B_ARMA
B_ARMA = makeARMAbuttons(pltARMA,axe);
% set values for handles based on ARMAopts
B_ARMA.ARMAopts = subSetValues(B_ARMA.ARMAopts,ARMAopts);
% turn on panel related to how model order is determined
modelOrdermethod = get(B_ARMA.ARMAopts.modelOrdermethod,'Value');
if modelOrdermethod == 1
% Fixed model order
set(B_ARMA.P.modelOrderFixedpanel,'Visible','on');
elseif modelOrdermethod == 2
% BIC model order (inactive)
set(B_ARMA.P.modelOrderFixedpanel,'Visible','off');
end
% turn on panel related to spike removal is terminated
Cutoffmethod = get(B_ARMA.ARMAopts.Cutoffmethod,'Value');
if Cutoffmethod == 1
% Jarque-Bera method
set(B_ARMA.P.CutoffJBpanel,'Visible','on');
set(B_ARMA.P.CutoffKurtpanel,'Visible','off');
elseif Cutoffmethod == 2
% Kurtosis method
set(B_ARMA.P.CutoffJBpanel,'Visible','off');
set(B_ARMA.P.CutoffKurtpanel,'Visible','on');
end
% turn off visibility of main screen
set(pltLaunch.id,'Visible','off')
%% set callback functions
% to set the modelOrdermethod (Fixed manual or BIC optimization)
set(B_ARMA.ARMAopts.modelOrdermethod,'Callback',@hmodelOrdermethodCallback);
% to set the cutoff method (Jarque Bera or Kurtosis)
set(B_ARMA.ARMAopts.Cutoffmethod,'Callback',@hCutoffmethodCallback);
% to terminate the ARMAopts pop up window
set(B_ARMA.P.doneARMA,'Callback',{@hdoneARMACallback,pltLaunch,pltARMA});
%% callback functions
%%%%%
function hmodelOrdermethodCallback(~, ~, ~)
% to change how model order is determined
% get value of listbox
modelOrdermethod = get(B_ARMA.ARMAopts.modelOrdermethod,'Value');
if modelOrdermethod == 1
% Fixed model order
set(B_ARMA.P.modelOrderFixedpanel,'Visible','on');
elseif modelOrdermethod == 2
% BIC model order (inactive)
set(B_ARMA.P.modelOrderFixedpanel,'Visible','off');
end
end
function hCutoffmethodCallback(~, ~, ~)
% get value of listbox
Cutoffmethod = get(B_ARMA.ARMAopts.Cutoffmethod,'Value');
if Cutoffmethod == 1
% Jarque-Bera method
set(B_ARMA.P.CutoffJBpanel,'Visible','on');
set(B_ARMA.P.CutoffKurtpanel,'Visible','off');
elseif Cutoffmethod == 2
% Kurtosis method
set(B_ARMA.P.CutoffJBpanel,'Visible','off');
set(B_ARMA.P.CutoffKurtpanel,'Visible','on');
end
end
function hdoneARMACallback(~, ~, pltLaunch, pltARMA)
% activated when the doneARMA button is pushed
% get values from subwindow
ARMAopts = subGetValues(B_ARMA.ARMAopts,ARMAopts);
% attach data to the pltLaunch window
setappdata(pltLaunch.id,'ARMAopts',ARMAopts);
% make the pltLaunch window visible
set(pltLaunch.id,'Visible','on')
% turn off visibility of pltARMA subwindow
set(pltARMA.id,'Visible','off')
end
end
function [pltARMA,axe] = CreatepltARMA
% to create the Figure used to specify ARMA parameters
% create figure
pltARMA.id = figure;
% size of figure
pltARMA.x = 10.3;
pltARMA.y = 19;
pltARMA.nxtot = 1; % number of axes in x direction
pltARMA.col = ([255 130 0])/255;
% size of axis
axe.xi = 1.1;
axe.yi = 0.6;
axe.scale = 8; % multiplier for axes
axe.x = 1*axe.scale;
axe.space = .4; % space between axes
axe.xin = axe.xi+(0:pltARMA.nxtot-1)*(axe.x+axe.space);
axe.yin = axe.yi;
% set figure properties
set(pltARMA.id,...
'Name','Set ARMA options',...
'Units','centimeters',...
'InvertHardcopy','off',...
'Color',pltARMA.col,...
'Position',[axe.xi axe.yi pltARMA.x pltARMA.y],...
'PaperPositionMode','auto');
end
function B_ARMA = makeARMAbuttons(pltARMA,axe)
% to create buttons & fields on ARMA subwindow
% set colors for figure
backcol = [220 220 220]/255; % used on level 1 boxes
backcol2 = [190 255 255]/255; % used on axes boxes
% set standard button properties
btn.height = 0.7; % standard button height
btn.width = axe.x/3;
Fsize = 9;
%
% set main panels
pan.order = [1];
pan.col = [1];
pan.row = [22];
pan.space = 0.2;
colmem = unique(pan.col);
ncoltot = length(colmem);
pan.height = (pan.row+1)*btn.height;
pan.yo = zeros(1,length(pan.order));
% calculate panel Order
for ncol = 1:ncoltot
colmemi = find(pan.col == ncol);
nmemtot = length(colmemi);
[dum,idx] = sort(pan.order(colmemi),'descend');
if nmemtot>1
space= ones(1,nmemtot-1)*pan.space;
pan.yo(colmemi(idx(2:end))) = cumsum(pan.height(colmemi(idx(1:end-1)))+space);
end
% add height to last column for 'run' button
if ncol == ncoltot
pan.yo(colmemi) = pan.yo(colmemi)+1;
end
end
%initialize button and axes counting paramters
pannum = 1;
btn.num = pan.row(pannum)-1;
%%%%% Parameters
%% ui panel listing all filter array options and parameters
B_ARMA.P.panOptions = uipanel(pltARMA.id,'Title','ARMA Options',...
'Units','centimeters',...
'FontSize',Fsize+2,...
'ForegroundColor','b',...
'BackgroundColor','w',...
'Position',[axe.xin(1),axe.yi+pan.yo(pannum),axe.x+0.1,pan.height(pannum)]);
ParentPanel = B_ARMA.P.panOptions;
% Model Dimension textbox
B_ARMA.P.modelOrder = uicontrol('Style','text',...
'Parent',ParentPanel,...
'Units','centimeters',...
'FontSize',Fsize+1,...
'FontAngle','italic',...
'BackgroundColor',backcol,...
'Position',[0 btn.num*btn.height btn.width*3 btn.height],...
'HorizontalAlignment','left',...
'String','Model Order');
% seasonality
btn.num = btn.num-1;
B_ARMA.ARMAopts.seasons = uicontrol('Style','checkbox',...
'Parent',ParentPanel,...
'Units','centimeters',...
'FontSize',Fsize,...
'BackgroundColor',backcol,...
'Position',[0 btn.num*btn.height btn.width*3 btn.height],...
'String','Seasonal Filter');
% choose either Fixed or BIC model Order
btn.num = btn.num-1;
B_ARMA.ARMAopts.modelOrdermethod = uicontrol('Style','popupmenu',...
'Parent',ParentPanel,...
'Units','centimeters',...
'Position',[0 btn.num*btn.height btn.width*3 btn.height],...
'FontSize',Fsize,...
'BackgroundColor','w',...
'String','Fixed |BIC optimized');
%% ui panel for fixed model Order
btn.num = btn.num-4;
B_ARMA.P.modelOrderFixedpanel = uipanel(...
'Parent',ParentPanel,...
'Units','centimeters',...
'FontSize',Fsize,...
'BackgroundColor',backcol,...
'Visible','off',...
'Position',[0 btn.num*btn.height btn.width*3 btn.height*4]);
% label
panbut = 3;
ParentPanel = B_ARMA.P.modelOrderFixedpanel;
B_ARMA.P.nparamtext = uicontrol('Style','text',...
'Parent',ParentPanel,...
'Units','centimeters',...
'Position',[btn.width panbut*btn.height btn.width btn.height*0.8],...
'FontSize',Fsize,...
'FontAngle','italic',...
'BackgroundColor',backcol,...
'HorizontalAlignment','center',...
'String','n');
B_ARMA.P.nparamtext = uicontrol('Style','text',...
'Parent',ParentPanel,...
'Units','centimeters',...
'Position',[btn.width*2 panbut*btn.height btn.width btn.height*0.8],...
'FontSize',Fsize,...
'FontAngle','italic',...
'BackgroundColor',backcol,...
'HorizontalAlignment','center',...
'String','Initial Guess(es)');
panbut = 2;
B_ARMA.P.pfixtext = uicontrol('Style','text',...
'Parent',ParentPanel,...
'Units','centimeters',...
'Position',[0 panbut*btn.height btn.width btn.height],...
'FontSize',Fsize,...
'BackgroundColor',backcol,...
'HorizontalAlignment','right',...
'String','P (AR)');
B_ARMA.ARMAopts.pfix = uicontrol('Style','edit',...
'Parent',ParentPanel,...
'Units','centimeters',...
'FontSize',Fsize,...
'Position',[btn.width panbut*btn.height btn.width btn.height]);
B_ARMA.ARMAopts.AR0 = uicontrol('Style','edit',...
'Parent',ParentPanel,...
'Units','centimeters',...
'FontSize',Fsize,...
'Position',[btn.width*2 panbut*btn.height btn.width btn.height]);
panbut = 1;
B_ARMA.P.qfixtext = uicontrol('Style','text',...
'Parent',ParentPanel,...
'Units','centimeters',...
'Position',[0 panbut*btn.height btn.width btn.height],...
'FontSize',Fsize,...
'BackgroundColor',backcol,...
'HorizontalAlignment','right',...
'String','Q (MA)');
B_ARMA.ARMAopts.qfix = uicontrol('Style','edit',...
'Parent',ParentPanel,...
'Units','centimeters',...
'FontSize',Fsize,...
'Position',[btn.width panbut*btn.height btn.width btn.height]);
B_ARMA.ARMAopts.MA0 = uicontrol('Style','edit',...
'Parent',ParentPanel,...
'Units','centimeters',...
'FontSize',Fsize,...
'Position',[btn.width*2 panbut*btn.height btn.width btn.height]);
panbut = 0;
B_ARMA.P.Constanttext = uicontrol('Style','text',...
'Parent',ParentPanel,...
'Units','centimeters',...
'Position',[0 panbut*btn.height btn.width btn.height],...
'FontSize',Fsize,...
'BackgroundColor',backcol,...
'HorizontalAlignment','right',...
'String','Constant');
B_ARMA.ARMAopts.Constant0 = uicontrol('Style','edit',...
'Parent',ParentPanel,...
'Units','centimeters',...
'FontSize',Fsize,...
'Position',[btn.width panbut*btn.height btn.width btn.height]);
ParentPanel = B_ARMA.P.panOptions;
%% ui panel for BIC model Order
% B_ARMA.P.modelOrderBICpanel = uipanel(...
% 'Parent',ParentPanel,...
% 'Units','centimeters',...
% 'FontSize',Fsize,...
% 'BackgroundColor',backcol,...
% 'Visible','off',...
% 'Position',[0 btn.num*btn.height btn.width*2 btn.height*3]);
% commented for now (turn on or off only)
%% cutoff parameters.
% Cutoff parameters textbox
btn.num = btn.num-1;
B_ARMA.P.modelOrder = uicontrol('Style','text',...
'Parent',ParentPanel,...
'Units','centimeters',...
'FontSize',Fsize+1,...
'FontAngle','italic',...
'BackgroundColor',backcol,...
'Position',[0 btn.num*btn.height btn.width*3 btn.height],...
'HorizontalAlignment','left',...
'String','Cutoff Parameters');
btn.num = btn.num-1;
B_ARMA.ARMAopts.Cutoffmethod = uicontrol('Style','popupmenu',...
'Parent',ParentPanel,...
'Units','centimeters',...
'Position',[0 btn.num*btn.height btn.width*3 btn.height],...
'FontSize',Fsize,...
'BackgroundColor','w',...
'String','Jarque-Berra |Kurtosis');
%% ui panel for Jarque-Bera method
btn.num = btn.num-2;
B_ARMA.P.CutoffJBpanel = uipanel(...
'Parent',ParentPanel,...
'Units','centimeters',...
'FontSize',Fsize,...
'BackgroundColor',backcol,...
'Visible','off',...
'Position',[0 btn.num*btn.height btn.width*3 btn.height*2]);
% label
panbut = 1;
ParentPanel = B_ARMA.P.CutoffJBpanel;
B_ARMA.P.JBtext = uicontrol('Style','text',...
'Parent',ParentPanel,...
'Units','centimeters',...
'Position',[0 panbut*btn.height btn.width*2 btn.height],...
'FontSize',Fsize,...
'HorizontalAlignment','right',...
'BackgroundColor',backcol,...
'String','\alpha threshold for JB');
B_ARMA.ARMAopts.JBAlpha = uicontrol('Style','edit',...
'Parent',ParentPanel,...
'Units','centimeters',...
'FontSize',Fsize,...
'Position',[btn.width*2 panbut*btn.height btn.width btn.height]);
%% ui panel for Kurtosis method
ParentPanel = B_ARMA.P.panOptions;
B_ARMA.P.CutoffKurtpanel = uipanel(...
'Parent',ParentPanel,...
'Units','centimeters',...
'FontSize',Fsize,...
'BackgroundColor',backcol,...
'Visible','on',...
'Position',[0 btn.num*btn.height btn.width*3 btn.height*2]);
% label
panbut = 1;
ParentPanel = B_ARMA.P.CutoffKurtpanel;
B_ARMA.P.kurtthreshtext = uicontrol('Style','text',...
'Parent',ParentPanel,...
'Units','centimeters',...
'Position',[0 panbut*btn.height btn.width*2 btn.height],...
'FontSize',Fsize,...
'BackgroundColor',backcol,...
'HorizontalAlignment','right',...
'String','Kurtosis threshold');
B_ARMA.ARMAopts.kurtthresh = uicontrol('Style','edit',...
'Parent',ParentPanel,...
'Units','centimeters',...
'FontSize',Fsize,...
'Position',[btn.width*2 panbut*btn.height btn.width btn.height]);
panbut = panbut-1;
B_ARMA.P.checkthreshtext = uicontrol('Style','text',...
'Parent',ParentPanel,...
'Units','centimeters',...
'Position',[0 panbut*btn.height btn.width*2 btn.height],...
'FontSize',Fsize,...
'BackgroundColor',backcol,...
'HorizontalAlignment','right',...
'String','Check threshold');
B_ARMA.ARMAopts.checkthresh = uicontrol('Style','edit',...
'Parent',ParentPanel,...
'Units','centimeters',...
'FontSize',Fsize,...
'Position',[btn.width*2 panbut*btn.height btn.width btn.height]);
%% Optimization parameters
ParentPanel = B_ARMA.P.panOptions;
btn.num = btn.num-1;
B_ARMA.P.OptimizationParams = uicontrol('Style','text',...
'Parent',ParentPanel,...
'Units','centimeters',...
'FontSize',Fsize+1,...
'FontAngle','italic',...
'BackgroundColor',backcol,...
'Position',[0 btn.num*btn.height btn.width*3 btn.height],...
'HorizontalAlignment','left',...
'String','Optimization Parameters');
btn.num = btn.num-1;
B_ARMA.P.nobs_shorttext = uicontrol('Style','text',...
'Parent',ParentPanel,...
'Units','centimeters',...
'Position',[0 btn.num*btn.height btn.width*2 btn.height],...
'FontSize',Fsize,...
'BackgroundColor',backcol,...
'HorizontalAlignment','right',...
'String','# obs for model estimation');
B_ARMA.ARMAopts.nobs_short = uicontrol('Style','edit',...
'Parent',ParentPanel,...
'Units','centimeters',...
'FontSize',Fsize,...
'Position',[btn.width*2 btn.num*btn.height btn.width btn.height]);
btn.num = btn.num-1;
B_ARMA.P.nobs_longtext = uicontrol('Style','text',...
'Parent',ParentPanel,...
'Units','centimeters',...
'Position',[0 btn.num*btn.height btn.width*2 btn.height],...
'FontSize',Fsize,...
'BackgroundColor',backcol,...
'HorizontalAlignment','right',...
'String','# obs for model application');
B_ARMA.ARMAopts.nobs_long = uicontrol('Style','edit',...
'Parent',ParentPanel,...
'Units','centimeters',...
'FontSize',Fsize,...
'Position',[btn.width*2 btn.num*btn.height btn.width btn.height]);
btn.num = btn.num-1;
B_ARMA.P.updatemodeltext = uicontrol('Style','text',...
'Parent',ParentPanel,...
'Units','centimeters',...
'Position',[0 btn.num*btn.height btn.width*2 btn.height],...
'FontSize',Fsize,...
'BackgroundColor',backcol,...
'HorizontalAlignment','right',...
'String','# replacements to update model');
B_ARMA.ARMAopts.updatemodel = uicontrol('Style','edit',...
'Parent',ParentPanel,...
'Units','centimeters',...
'FontSize',Fsize,...
'Position',[btn.width*2 btn.num*btn.height btn.width btn.height]);
%% Numerical convergence parameters
btn.num = btn.num-1;
B_ARMA.P.OptimizationParams = uicontrol('Style','text',...
'Parent',ParentPanel,...
'Units','centimeters',...
'FontSize',Fsize+1,...
'FontAngle','italic',...
'BackgroundColor',backcol,...
'Position',[0 btn.num*btn.height btn.width*3 btn.height],...
'HorizontalAlignment','left',...
'String','Numerical Convergence Parameters');
btn.num = btn.num-1;
B_ARMA.P.Algorithmtext = uicontrol('Style','text',...
'Parent',ParentPanel,...
'Units','centimeters',...
'Position',[0 btn.num*btn.height btn.width*2 btn.height],...
'FontSize',Fsize,...
'BackgroundColor',backcol,...
'HorizontalAlignment','right',...
'String','Algorithm for optimization');
B_ARMA.ARMAopts.Algorithm = uicontrol('Style','edit',...
'Parent',ParentPanel,...
'Units','centimeters',...
'FontSize',Fsize,...
'Position',[btn.width*2 btn.num*btn.height btn.width btn.height]);
btn.num = btn.num-1;
B_ARMA.P.MaxFunEvalstext = uicontrol('Style','text',...
'Parent',ParentPanel,...
'Units','centimeters',...
'Position',[0 btn.num*btn.height btn.width*2 btn.height],...
'FontSize',Fsize,...
'BackgroundColor',backcol,...
'HorizontalAlignment','right',...
'String','Max # of fn evaluations');
B_ARMA.ARMAopts.MaxFunEvals = uicontrol('Style','edit',...
'Parent',ParentPanel,...
'Units','centimeters',...
'FontSize',Fsize,...
'Position',[btn.width*2 btn.num*btn.height btn.width btn.height]);
btn.num = btn.num-1;
B_ARMA.P.TolCon = uicontrol('Style','text',...
'Parent',ParentPanel,...
'Units','centimeters',...
'Position',[0 btn.num*btn.height btn.width*2 btn.height],...
'FontSize',Fsize,...
'BackgroundColor',backcol,...
'HorizontalAlignment','right',...
'String','Tolerance on Constraint');
B_ARMA.ARMAopts.TolCon = uicontrol('Style','edit',...
'Parent',ParentPanel,...
'Units','centimeters',...
'FontSize',Fsize,...
'Position',[btn.width*2 btn.num*btn.height btn.width btn.height]);
btn.num = btn.num-1;
B_ARMA.P.TolFuntext = uicontrol('Style','text',...
'Parent',ParentPanel,...
'Units','centimeters',...
'Position',[0 btn.num*btn.height btn.width*2 btn.height],...
'FontSize',Fsize,...
'BackgroundColor',backcol,...
'HorizontalAlignment','right',...
'String','Tolerance on function value');
B_ARMA.ARMAopts.TolFun = uicontrol('Style','edit',...
'Parent',ParentPanel,...
'Units','centimeters',...
'FontSize',Fsize,...
'Position',[btn.width*2 btn.num*btn.height btn.width btn.height]);
btn.num = btn.num-1;
B_ARMA.P.TolX = uicontrol('Style','text',...
'Parent',ParentPanel,...
'Units','centimeters',...
'Position',[0 btn.num*btn.height btn.width*2 btn.height],...
'FontSize',Fsize,...
'BackgroundColor',backcol,...
'HorizontalAlignment','right',...
'String','Tolerance on x');
B_ARMA.ARMAopts.TolX = uicontrol('Style','edit',...
'Parent',ParentPanel,...
'Units','centimeters',...
'FontSize',Fsize,...
'Position',[btn.width*2 btn.num*btn.height btn.width btn.height]);
btn.num = btn.num-1;
B_ARMA.P.Displaytext = uicontrol('Style','text',...
'Parent',ParentPanel,...
'Units','centimeters',...
'Position',[0 btn.num*btn.height btn.width*2 btn.height],...
'FontSize',Fsize,...
'BackgroundColor',backcol,...
'HorizontalAlignment','right',...
'String','Turn display off and on');
B_ARMA.ARMAopts.Display = uicontrol('Style','edit',...
'Parent',ParentPanel,...
'Units','centimeters',...
'FontSize',Fsize,...
'Position',[btn.width*2 btn.num*btn.height btn.width btn.height]);
btn.num = btn.num-2;
%% Done button
B_ARMA.P.doneARMA = uicontrol('Style','pushbutton',...
'Parent',pltARMA.id,...
'Units','centimeters',...
'Position',[btn.width*2.5 0.5 btn.width btn.height],...
'FontSize',Fsize,...
'BackgroundColor','w',...
'String','Done');
end