-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathVFTool.m
516 lines (477 loc) · 19.5 KB
/
VFTool.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
%% VFTool 0.1
% this is a GUI interface for the Vector Fitting tool that can find a
% model representing a specified complex function in the frequency-domain.
% The VF model is defined: $f(s) = \sum_{n=1}^{N}\frac{r_n}{s-p_n} + d + se$
% where $s$ stands for complex frequency ($s = 2\pif$), $N$ is order of the
% approximation i.e. number of residues $r_n$ and poles $p_n$. Szmbols $d$ and
% $e$ are amplitude coefficients.
set(0, 'units', 'pixels')
pixRes = get(0, 'screensize');
position = [10 10 1600 1000];
if pixRes(1, 3) < position(1, 3)
position = pixRes;
end
fig = figure('Position', position, 'Name', 'VFTool v0.1', ...
'NumberTitle', 'off');
textBackColor = [0.7 0.7 0.7];
%% input function
h.funPanel = uipanel(fig, 'Title', 'Specify ref curve', 'FontSize',16,...
'Position',[0.01 0.45 0.38 0.5]);
h.bgFunSpec = uibuttongroup(h.funPanel, 'Visible', 'on', ...
'Units', 'normalized', ...
'Position', [0 0.85 1 0.1], ...
'SelectionChangedFcn', @bgFunSpecSelection);
h.buttLoadFile = uicontrol(h.bgFunSpec, 'Style', 'radiobutton', ...
'String', 'Load from file', ...
'Units', 'normalized', ...
'Position', [0.05 0.1 0.3 0.8], ...
'FontSize', 14, ...
'HandleVisibility', 'off', ...
'TooltipString', ['Choose type of reference function specification:', ...
'load from file, specify handle function or specify by VF model.']);
h.buttSpecModel = uicontrol(h.bgFunSpec, 'Style', 'radiobutton', ...
'String', 'Handle function', ...
'Units', 'normalized', ...
'Position', [0.35 0.1 0.3 0.8], ...
'FontSize', 14, ...
'HandleVisibility', 'off', ...
'TooltipString', ['Choose type of reference function specification:', ...
'load from file, specify handle function or specify by VF model.']);
h.buttSpecModel = uicontrol(h.bgFunSpec, 'Style', 'radiobutton', ...
'String', 'Specify p, r, d, e', ...
'Units', 'normalized', ...
'Position', [0.65 0.1 0.3 0.8], ...
'FontSize', 14, ...
'HandleVisibility', 'off', ...
'TooltipString', ['Choose type of reference function specification:', ...
'load from file, specify handle function or specify by VF model.']);
%% load from file
h.loadPanel = uipanel(h.funPanel, 'Position', [0 0 1 0.85], ...
'Visible', 'on');
h.editPath = uicontrol(h.loadPanel, 'Style', 'edit', 'Units', 'normalized', ...
'Position',[0.05 0.45 0.7 0.15], 'String', pwd, 'FontSize', 12, ...
'TooltipString', 'Write down the folder to search path.');
[figOpen, cmap] = imread(fullfile('figures', 'openFile.png'));
h.pbLoadFile = uicontrol(h.loadPanel, 'Style', 'pushbutton', ...
'Units', 'normalized', 'Position',[0.8 0.45 0.1 0.15], 'String', '...', ...
'FontSize', 12, 'CData', figOpen, 'Callback', @loadFile, ...
'TooltipString', 'Choose a file containing data.');
%% Handle function specification
h.handlePanel = uipanel(h.funPanel, 'Position', [0 0 1 0.85], ...
'Visible', 'off');
h.textHandleFun = uicontrol(h.handlePanel, 'Style', 'edit', ...
'String', 'Handle fun', ...
'Units', 'normalized', ...
'Position', [0.05 0.6 0.2 0.1], ...
'FontSize', 14, ...
'BackgroundColor', textBackColor, ...
'Enable', 'off');
h.editHandleFun = uicontrol(h.handlePanel, 'Style', 'edit', ...
'String', '@(f) 1./(0.05 + 1j*(2*pi*f*1e-4 - 1./(2*pi*f*1e-4)) )', ...
'Units', 'normalized', ...
'Position', [0.25 0.6 0.7 0.1], ...
'FontSize', 14, ...
'TooltipString', 'Write down a complex handle function.');
h.textHandleFreq = uicontrol(h.handlePanel, 'Style', 'edit', ...
'String', 'frequency', ...
'Units', 'normalized', ...
'Position', [0.05 0.45 0.2 0.1], ...
'FontSize', 14, ...
'BackgroundColor', textBackColor, ...
'Enable', 'off');
h.popupHandleFreq = uicontrol(h.handlePanel, 'Style', 'popupmenu', ...
'String', {'lin', 'log'}, ...
'Units', 'normalized', ...
'Position', [0.25 0.44 0.2 0.1], ...
'FontSize', 14, ...
'TooltipString', 'Specify frequency samples distribution type.');
h.editHandleFStart = uicontrol(h.handlePanel, 'Style', 'edit', ...
'String', '0.7e3', ...
'Units', 'normalized', ...
'Position', [0.55 0.45 0.4/3 0.1], ...
'FontSize', 14, ...
'TooltipString', 'Enter starting frequency.');
h.editHandleFEnd = uicontrol(h.handlePanel, 'Style', 'edit', ...
'String', '3e3', ...
'Units', 'normalized', ...
'Position', [0.55+0.4/3 0.45 0.4/3 0.1], ...
'FontSize', 14, ...
'TooltipString', 'Enter stop frequency.');
h.editHandleFNS = uicontrol(h.handlePanel, 'Style', 'edit', ...
'String', '101', ...
'Units', 'normalized', ...
'Position', [0.55+0.8/3 0.45 0.4/3 0.1], ...
'FontSize', 14, ...
'TooltipString', 'Enter number of frequency samples.');
h.pbHandleFun = uicontrol(h.handlePanel, 'Style', 'pushbutton', ...
'String', 'Update fun', ...
'Units', 'normalized', ...
'Position', [0.35 0.3 0.3 0.1], ...
'FontSize', 14, ...
'Callback', @updateHandleFun, ...
'TooltipString', 'Push to renew the reference function.');
%% specify p, r , d, e
h.specPanel = uipanel(h.funPanel, 'Position', [0 0 1 0.85], ...
'Visible', 'off');
h.textSpecD = uicontrol(h.specPanel, 'Style', 'edit', ...
'String', 'd', ...
'Units', 'normalized', ...
'Position', [0.05 0.85 0.2 0.1], ...
'FontSize', 14, ...
'BackgroundColor', textBackColor, ...
'Enable', 'off');
h.editSpecD = uicontrol(h.specPanel, 'Style', 'edit', ...
'String', '0.5', ...
'Units', 'normalized', ...
'Position', [0.25 0.85 0.2 0.1], ...
'FontSize', 14, ...
'TooltipString', 'Enter d coefficient.');
h.textSpecE = uicontrol(h.specPanel, 'Style', 'edit', ...
'String', 'e', ...
'Units', 'normalized', ...
'Position', [0.55 0.85 0.2 0.1], ...
'FontSize', 14, ...
'BackgroundColor', textBackColor, ...
'Enable', 'off');
h.editSpecE = uicontrol(h.specPanel, 'Style', 'edit', ...
'String', '0.0', ...
'Units', 'normalized', ...
'Position', [0.75 0.85 0.2 0.1], ...
'FontSize', 14, ...
'TooltipString', 'Enter e coefficient.');
h.textSpecFreq = uicontrol(h.specPanel, 'Style', 'edit', ...
'String', 'frequency', ...
'Units', 'normalized', ...
'Position', [0.05 0.65 0.2 0.1], ...
'FontSize', 14, ...
'BackgroundColor', textBackColor, ...
'Enable', 'off');
h.popupSpecFreq = uicontrol(h.specPanel, 'Style', 'popupmenu', ...
'String', {'log', 'lin'}, ...
'Units', 'normalized', ...
'Position', [0.25 0.64 0.2 0.1], ...
'FontSize', 14, ...
'TooltipString', 'Specify frequency samples distribution type.');
h.editSpecFStart = uicontrol(h.specPanel, 'Style', 'edit', ...
'String', '0', ...
'Units', 'normalized', ...
'Position', [0.55 0.65 0.4/3 0.1], ...
'FontSize', 14, ...
'TooltipString', 'Enter starting frequency.');
h.editSpecFEnd = uicontrol(h.specPanel, 'Style', 'edit', ...
'String', '4', ...
'Units', 'normalized', ...
'Position', [0.55+0.4/3 0.65 0.4/3 0.1], ...
'FontSize', 14, ...
'TooltipString', 'Enter stop frequency.');
h.editSpecFNS = uicontrol(h.specPanel, 'Style', 'edit', ...
'String', '101', ...
'Units', 'normalized', ...
'Position', [0.55+0.8/3 0.65 0.4/3 0.1], ...
'FontSize', 14, ...
'TooltipString', 'Enter number of frequency samples.');
data = {'2', '30+1j*40', ''; ...
'', '30-1j*40', ''; ...
'-5', '-100+1j*500', ''; ...
'', '-100-1j*500', ''};
h.tablePolesResidues = uitable(h.specPanel, ...
'Units', 'normalized', ...
'ColumnWidth', {100}, ...
'ColumnEditable', true, ...
'Position', [0 0.25 1 0.315], ...
'Data', data, ...
'ColumnName', {'1', '...'}, ...
'RowName', {'r [-]', 'r* [-]', 'p [-]', 'p* [-]'}, ...
'FontSize', 12, ...
'Enable', 'on', ...
'CellEditCallback', @tableCellEdit, ...
'TooltipString', ['Enter poles and residues. If you write down a ', ...
'complex entry to the 1-st or 3-rd row, the cell below will be filled ', ...
'with a complex conjugate value.']);
h.pbUpdateRefFun = uicontrol(h.specPanel, 'Style', 'pushbutton', ...
'String', 'Update fun', ...
'Units', 'normalized', ...
'Position', [0.35 0.05 0.3 0.1], ...
'FontSize', 14, ...
'Callback', @updateRefFun, ...
'TooltipString', 'Push to renew the reference function.');
%% VF solver settings
h.inputPanel = uipanel(fig, 'Title', 'Specify VF settings', 'FontSize',16,...
'Position',[0.01 0.05 0.38 0.4]);
h.bgVFTypeSpec = uibuttongroup(h.inputPanel, 'Visible', 'on', ...
'Units', 'normalized', ...
'Position', [0 0.85 1 0.12], ...
'SelectionChangedFcn', @bgVFTypeSpecSelection);
%
h.buttUserVF = uicontrol(h.bgVFTypeSpec, 'Style', 'radiobutton', ...
'String', 'User-defined VF', ...
'Units', 'normalized', ...
'Position', [0.1 0.1 0.4 0.8], ...
'FontSize', 14, ...
'HandleVisibility', 'off', ...
'TooltipString', ['Specify a type of VF search: ', ...
'automatic or user-determined.']);
h.buttAutoVF = uicontrol(h.bgVFTypeSpec, 'Style', 'radiobutton', ...
'String', 'Automatic VF', ...
'Units', 'normalized', ...
'Position', [0.5 0.1 0.4 0.8], ...
'FontSize', 14, ...
'HandleVisibility', 'off', ...
'TooltipString', ['Specify a type of VF search: ', ...
'automatic or user-determined.']);
h.autoVFPanel = uipanel(h.inputPanel, 'Position', [0 0 1 0.85], ...
'Visible', 'off');
h.userVFPanel = uipanel(h.inputPanel, 'Position', [0 0 1 0.85], ...
'Visible', 'on');
%% AutoVF
h.pbRunAutoVF = uicontrol(h.autoVFPanel, 'Style', 'pushbutton', ...
'String', 'Run VF', ...
'Units', 'normalized', ...
'Position', [0.35 0.05 0.3 0.1], ...
'FontSize', 14, ...
'Callback', @runAutoVF, ...
'TooltipString', 'Run the automatic Vector Fitting.');
h.autoTextRmse = uicontrol(h.autoVFPanel, 'Style', 'edit', ...
'String', 'Required rmse', ...
'Units', 'normalized', ...
'Position', [0.1 0.2 0.3 0.1], ...
'FontSize', 14, ...
'BackgroundColor', textBackColor, ...
'Enable', 'off');
h.autoEditRmse = uicontrol(h.autoVFPanel, 'Style', 'edit', ...
'String', '1e-5', ...
'Units', 'normalized', ...
'Position', [0.6 0.2 0.3 0.1], ...
'FontSize', 14, ...
'TooltipString', ['Specify a wanted value of RMSE ', ...
'(Root Mean Square Error).']);
h.autoTextMaxT = uicontrol(h.autoVFPanel, 'Style', 'edit', ...
'String', 'Max # trials', ...
'Units', 'normalized', ...
'Position', [0.1 0.32 0.3 0.1], ...
'FontSize', 14, ...
'BackgroundColor', textBackColor, ...
'Enable', 'off');
h.autoEditMaxT = uicontrol(h.autoVFPanel, 'Style', 'edit', ...
'String', '20', ...
'Units', 'normalized', ...
'Position', [0.6 0.32 0.3 0.1], ...
'FontSize', 14, ...
'TooltipString', 'Specify max number of VF runs.');
h.autoTextNIters = uicontrol(h.autoVFPanel, 'Style', 'edit', ...
'String', '# iterations', ...
'Units', 'normalized', ...
'Position', [0.1 0.44 0.3 0.1], ...
'FontSize', 14, ...
'BackgroundColor', textBackColor, ...
'Enable', 'off');
h.autoEditNIters = uicontrol(h.autoVFPanel, 'Style', 'edit', ...
'String', '1', ...
'Units', 'normalized', ...
'Position', [0.6 0.44 0.3 0.1], ...
'FontSize', 14, ...
'TooltipString', 'Specify number of iterations per a single VF run.');
h.autoTextPoleType = uicontrol(h.autoVFPanel, 'Style', 'edit', ...
'String', 'Init. poles type', ...
'Units', 'normalized', ...
'Position', [0.1 0.56 0.3 0.1], ...
'FontSize', 14, ...
'BackgroundColor', textBackColor, ...
'Enable', 'off');
h.autoPopupPoleType = uicontrol(h.autoVFPanel, 'Style', 'popupmenu', ...
'String', {'complex', 'real'}, ...
'Units', 'normalized', ...
'Position', [0.6 0.56 0.3 0.1], ...
'FontSize', 14, ...
'TooltipString', 'Specify initial pole type: real or complex.');
h.autoTextDistr = uicontrol(h.autoVFPanel, 'Style', 'edit', ...
'String', 'Init. pole distribution', ...
'Units', 'normalized', ...
'Position', [0.1 0.68 0.3 0.1], ...
'FontSize', 14, ...
'BackgroundColor', textBackColor, ...
'Enable', 'off');
h.autoPopupDistr = uicontrol(h.autoVFPanel, 'Style', 'popupmenu', ...
'String', {'linear', 'logarithmic'}, ...
'Units', 'normalized', ...
'Position', [0.6 0.68 0.3 0.1], ...
'FontSize', 14, ...
'TooltipString', ['Specify initial pole distribution type: ', ...
'linear or complex.']);
h.autoTextResChoice = uicontrol(h.autoVFPanel, 'Style', 'edit', ...
'String', 'Choice type', ...
'Units', 'normalized', ...
'Position', [0.1 0.8 0.3 0.1], ...
'FontSize', 14, ...
'BackgroundColor', textBackColor, ...
'Enable', 'off');
h.autoPopupResChoice = uicontrol(h.autoVFPanel, 'Style', 'popupmenu', ...
'String', {'first', 'best'}, ...
'Units', 'normalized', ...
'Position', [0.6 0.8 0.3 0.1], ...
'FontSize', 14, ...
'TooltipString', ['Specify final model choice type: ', ...
'''first'' (first model satysfying the rmse is taken), ', ...
'''best'' (model with the minimal number of poles satysfying rmse ', ...
'is taken).']);
%% User-guided VF
h.pbRunUserVF = uicontrol(h.userVFPanel, 'Style', 'pushbutton', ...
'String', 'Run VF', ...
'Units', 'normalized', ...
'Position', [0.35 0.05 0.3 0.1], ...
'FontSize', 14, ...
'Callback', @runUserVF);
h.userTextPoleType = uicontrol(h.userVFPanel, 'Style', 'edit', ...
'String', 'Init. poles type', ...
'Units', 'normalized', ...
'Position', [0.1 0.4 0.3 0.1], ...
'FontSize', 14, ...
'BackgroundColor', textBackColor, ...
'Enable', 'off');
h.userPopupPoleType = uicontrol(h.userVFPanel, 'Style', 'popupmenu', ...
'String', {'complex', 'real'}, ...
'Units', 'normalized', ...
'Position', [0.6 0.4 0.3 0.1], ...
'FontSize', 14, ...
'TooltipString', 'Specify initial pole type: real or complex.');
h.userTextDistr = uicontrol(h.userVFPanel, 'Style', 'edit', ...
'String', 'Init. pole distribution', ...
'Units', 'normalized', ...
'Position', [0.1 0.52 0.3 0.1], ...
'FontSize', 14, ...
'BackgroundColor', textBackColor, ...
'Enable', 'off');
h.userPopupDistr = uicontrol(h.userVFPanel, 'Style', 'popupmenu', ...
'String', {'linear', 'logarithmic'}, ...
'Units', 'normalized', ...
'Position', [0.6 0.52 0.3 0.1], ...
'FontSize', 14, ...
'TooltipString', ['Specify initial pole distribution type: ', ...
'linear or complex.']);
h.userTextNIters = uicontrol(h.userVFPanel, 'Style', 'edit', ...
'String', '# iterations', ...
'Units', 'normalized', ...
'Position', [0.1 0.64 0.3 0.1], ...
'FontSize', 14, ...
'BackgroundColor', textBackColor, ...
'Enable', 'off');
h.userEditNIters = uicontrol(h.userVFPanel, 'Style', 'edit', ...
'String', '1', ...
'Units', 'normalized', ...
'Position', [0.6 0.64 0.3 0.1], ...
'FontSize', 14, ...
'TooltipString', 'Specify number of iterations of a single VF run.');
h.userTextNPoles = uicontrol(h.userVFPanel, 'Style', 'edit', ...
'String', 'N - # of poles', ...
'Units', 'normalized', ...
'Position', [0.1 0.76 0.3 0.1], ...
'FontSize', 14, ...
'BackgroundColor', textBackColor, ...
'Enable', 'off');
h.userEditNPoles = uicontrol(h.userVFPanel, 'Style', 'edit', ...
'String', '10', ...
'Units', 'normalized', ...
'Position', [0.6 0.76 0.3 0.1], ...
'FontSize', 14, ...
'TooltipString', 'Specify number of poles of the model.');
%% plot spec
h.plotSpecPanel = uipanel(fig, 'Title', 'Specify plot settings', ...
'FontSize', 16, 'Position', [0.45 0.8 0.5 0.15]);
h.bgPlotSpec = uibuttongroup(h.plotSpecPanel, ...
'Units', 'normalized', ...
'Position', [0 0.55 1 0.4], ...
'SelectionChangedFcn', @bgPlotSpecFun);
h.buttAbs = uicontrol(h.bgPlotSpec, 'Style', 'radiobutton', ...
'String', 'Abs', ...
'Units', 'normalized', ...
'Position', [0.1 0.1 0.3 0.8], ...
'FontSize', 14, ...
'HandleVisibility', 'off', ...
'TooltipString', 'Specify type of plot: ''abs'', ''real'' or ''imag''.');
h.buttReal = uicontrol(h.bgPlotSpec, 'Style', 'radiobutton', ...
'String', 'Real', ...
'Units', 'normalized', ...
'Position', [0.4 0.1 0.3 0.8], ...
'FontSize', 14, ...
'HandleVisibility', 'off', ...
'TooltipString', 'Specify type of plot: ''abs'', ''real'' or ''imag''.');
h.buttImag = uicontrol(h.bgPlotSpec, 'Style', 'radiobutton', ...
'String', 'Imag', ...
'Units', 'normalized', ...
'Position', [0.7 0.1 0.3 0.8], ...
'FontSize', 14, ...
'HandleVisibility', 'off', ...
'TooltipString', 'Specify type of plot: ''abs'', ''real'' or ''imag''.');
h.buttLogX = uicontrol(h.plotSpecPanel, 'Style', 'radiobutton', ...
'String', 'log x-axis', ...
'Units', 'normalized', ...
'Position', [0.2 0.1 0.3 0.3], ...
'FontSize', 14, ...
'HandleVisibility', 'off', ...
'Callback', @bgPlotSpecFun, ...
'TooltipString', 'Choose to have logarithmic x-axis.');
h.buttLogY = uicontrol(h.plotSpecPanel, 'Style', 'radiobutton', ...
'String', 'log y-axis', ...
'Units', 'normalized', ...
'Position', [0.55 0.1 0.3 0.3], ...
'FontSize', 14, ...
'HandleVisibility', 'off', ...
'Callback', @bgPlotSpecFun, ...
'TooltipString', 'Choose to have logarithmic y-axis.');
%% axes
h.axes = axes(fig, 'Units', 'normalized', ...
'Position', [0.45 0.3 0.5 0.45], 'FontSize', 16, ...
'NextPlot', 'replacechildren');
grid on
xlabel(h.axes, 'frequency [Hz]', 'Interpreter', 'latex')
ylabel(h.axes, '$f$ [-]', 'Interpreter', 'latex')
%% results display
h.resultsPanel = uipanel(fig, 'Title', 'Results', ...
'FontSize', 16, 'Position', [0.45 0.05 0.5 0.15]);
h.textResRmse = uicontrol(h.resultsPanel, 'Style', 'edit', ...
'String', 'rmse = ?', ...
'Units', 'normalized', ...
'Position', [0.1 0.6 0.3 0.3], ...
'Enable', 'inactive', ...
'FontSize', 14, ...
'TooltipString', ['Value of rmse (Root Mean Square Error) ', ...
'of the function obtained by the VF.']);
h.textResNPoles = uicontrol(h.resultsPanel, 'Style', 'edit', ...
'String', '# poles N = ?', ...
'Units', 'normalized', ...
'Position', [0.1 0.2 0.3 0.3], ...
'FontSize', 14, ...
'Enable', 'inactive', ...
'TooltipString', 'Number of poles of the final VF model.');
h.saveCheckMat = uicontrol(h.resultsPanel, 'Style', 'checkbox', ...
'String', '*.mat', ...
'Units', 'normalized', ...
'Position', [0.45 0.6 0.2 0.3], ...
'FontSize', 14, ...
'TooltipString', 'Check to save VF model data to ''*.mat'' file.');
h.saveCheckTxt = uicontrol(h.resultsPanel, 'Style', 'checkbox', ...
'String', '*.txt', ...
'Units', 'normalized', ...
'Position', [0.65 0.6 0.2 0.3], ...
'FontSize', 14, ...
'TooltipString', 'Check to save VF model data to ''*.txt'' file.');
h.saveCheckXlsx = uicontrol(h.resultsPanel, 'Style', 'checkbox', ...
'String', '*.xlsx', ...
'Units', 'normalized', ...
'Position', [0.85 0.6 0.2 0.3], ...
'FontSize', 14, ...
'TooltipString', 'Check to save VF model data to ''*.xlsx'' file.');
h.saveEdit = uicontrol(h.resultsPanel, 'Style', 'edit', ...
'String', 'myFileName', ...
'Units', 'normalized', ...
'Position', [0.45 0.1 0.2 0.3], ...
'FontSize', 14, ...
'TooltipString', 'Specify the name of the file to be saved.');
h.savePB = uicontrol(h.resultsPanel, 'Style', 'pushbutton', ...
'String', 'Save model', ...
'Units', 'normalized', ...
'Position', [0.75 0.1 0.2 0.3], ...
'FontSize', 14, ...
'Callback', @saveModelVF, ...
'TooltipString', 'Click to save VF data to specified file formats.');
setappdata(fig, 'handles', h)