-
Notifications
You must be signed in to change notification settings - Fork 0
/
plot_error.m
363 lines (345 loc) · 20.5 KB
/
plot_error.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
clear all; %clc;
%------------------------------------------------------------------------------
% NOTATION:
% err_cA : relative forward error 1st wave kernel Nadukandi--Higham algorithm
% err_sA : relative forward error 2nd wave kernel Nadukandi--Higham algorithm
% errfunmcA : relative forward error 1st wave kernel Davies--Higham algorithm
% errfunmsA : relative forward error 2nd wave kernel Davies--Higham algorithm
% condfcA : error estimate for 1st wave kernel matrix function
% condfsA : error estimate for 2nd wave kernel matrix function
%------------------------------------------------------------------------------
show_err_diff = true; % illustrates change in err_cA, err_sA when A <-- A*60
keep_sort_order = true; % when A <-- A*60, sort order of estimate might change
% true: you will see serrated and broken estimate line
% Results obtained using MATLAB 2017b.
% All exceptions caught during execution are denoted as NaN
% They are left as NaN as these data when plotted only creates gaps.
sol = [%n, err_cA , err_sA , errfunmcA, errfunmsA, condfcA , condfsA
%-----------------------------------------------------------------
% matrix(1:end, 15)
%-----------------------------------------------------------------
01, 2.78e-16 , 5.28e-16 , 1.52e-15 , 2.70e-15 , 2.04e-15, 1.04e-15;
02, 8.55e-16 , 6.83e-16 , 9.61e-05 , 3.55e-04 , 6.78e-15, 4.71e-15;
03, 5.43e-16 , 4.63e-16 , 2.67e-15 , 3.22e-15 , 3.31e-15, 2.59e-15;
04, 2.01e-16 , 3.23e-16 , 7.46e-14 , 7.41e-14 , 5.08e-15, 3.75e-15;
05, 1.53e-15 , 1.47e-15 , 1.63e-15 , 1.10e-15 , 1.82e-14, 1.66e-14;
06, 9.16e-16 , 9.76e-16 , 1.75e-14 , 1.47e-14 , 6.22e-15, 4.57e-15;
07, 2.20e-15 , 1.99e-15 , 1.68e-15 , 1.65e-15 , 1.24e-14, 1.07e-14;
08, 5.74e-16 , 4.72e-16 , 2.55e-15 , 2.29e-15 , 2.29e-15, 2.06e-15;
09, 7.03e-16 , 5.80e-16 , 3.96e-15 , 4.96e-15 , 4.05e-15, 2.70e-15;
10, 8.83e-16 , 9.24e-16 , 2.28e-15 , 1.95e-15 , 1.44e-14, 1.28e-14;
11, 4.64e-18 , 2.36e-17 , 9.73e-10 , 2.57e-09 , 1.26e-15, 5.18e-16;
12, 8.74e-16 , 9.09e-16 , 2.71e-10 , 7.02e-11 , 1.16e-14, 9.91e-15;
13, 4.18e-16 , 6.65e-16 , 4.11e-15 , 5.66e-15 , 2.05e-15, 9.73e-16;
14, 6.03e-16 , 6.29e-16 , 5.70e-15 , 6.19e-15 , 3.07e-15, 1.84e-15;
15, 1.52e-15 , 1.24e-15 , 2.34e-15 , 1.86e-15 , 5.47e-15, 4.64e-15;
16, 6.85e+29 , 6.70e+28 , 4.57e+00 , 2.31e+00 , 8.86e+54, 2.06e+45;
17, NaN , NaN , NaN , NaN , NaN , NaN ;
18, 1.57e-16 , 3.59e-16 , 2.04e-16 , 3.27e-16 , 2.07e-15, 9.79e-16;
19, 1.59e-16 , 2.98e-16 , 2.98e-16 , 3.07e-16 , 2.46e-15, 1.37e-15;
20, 3.67e-16 , 4.90e-16 , 2.70e-15 , 3.12e-15 , 2.61e-15, 1.37e-15;
21, NaN , NaN , NaN , NaN , NaN , NaN ;
22, 4.58e-16 , 5.09e-16 , 1.27e-15 , 1.66e-15 , 4.61e-15, 3.19e-15;
23, 4.16e-16 , 1.97e-15 , 2.34e-13 , 2.50e-13 , 5.15e-15, 1.70e-14;
24, 2.43e-16 , 6.22e-16 , 2.36e-15 , 3.48e-15 , 2.54e-15, 1.39e-15;
25, 7.29e-16 , 7.44e-16 , 1.22e-15 , 1.18e-15 , 1.21e-14, 1.10e-14;
26, 1.31e-15 , 1.32e-15 , 8.59e-16 , 8.44e-16 , 8.41e-15, 7.62e-15;
27, 4.89e-16 , 4.35e-16 , 1.50e-15 , 2.88e-15 , 2.27e-15, 1.30e-15;
28, 6.91e-16 , 6.33e-16 , 4.15e-15 , 4.47e-15 , 3.38e-15, 2.19e-15;
29, 3.81e-15 , 2.80e-15 , 5.20e-16 , 6.02e-16 , 6.66e-15, 5.00e-15;
30, 4.16e-16 , 7.24e-16 , 2.49e-15 , 3.41e-15 , 1.65e-15, 7.51e-16;
31, 3.05e-16 , 8.06e-16 , 4.15e-15 , 6.80e-15 , 2.10e-15, 1.22e-15;
32, 1.98e-16 , 7.41e-16 , 2.66e-15 , 3.17e-15 , 2.26e-15, 1.33e-15;
33, 4.80e-16 , 5.41e-16 , 1.54e-15 , 2.35e-15 , 4.69e-15, 3.29e-15;
34, 2.52e-16 , 5.37e-16 , 3.68e-15 , 5.08e-15 , 1.60e-15, 7.47e-16;
35, 2.47e-16 , 3.61e-16 , 8.80e-16 , 2.34e-15 , 4.02e-15, 3.02e-15;
36, 5.35e-16 , 5.85e-16 , 4.59e-15 , 4.24e-15 , 2.54e-15, 2.61e-15;
37, 2.72e-16 , 4.85e-16 , 1.56e-15 , 2.60e-15 , 2.20e-15, 1.33e-15;
38, 1.53e-16 , 3.48e-16 , 6.86e-15 , 9.25e-15 , 1.81e-15, 8.97e-16;
39, 1.02e-15 , 8.27e-16 , 3.95e-15 , 3.72e-15 , 7.76e-15, 6.13e-15;
40, 1.05e-16 , 1.80e-16 , 6.98e-16 , 2.86e-16 , 4.79e-15, 3.01e-15;
41, 2.64e-16 , 5.89e-16 , 1.13e-15 , 2.05e-15 , 2.32e-15, 1.31e-15;
42, NaN , NaN , NaN , NaN , NaN , NaN ;
43, 3.69e-15 , 3.60e-15 , 2.30e-15 , 2.35e-15 , 7.24e-14, 6.75e-14;
44, NaN , NaN , NaN , NaN , NaN , NaN ;
45, 4.73e-16 , 5.76e-16 , 1.42e-15 , 2.65e-15 , 4.72e-15, 3.20e-15;
46, 3.09e-16 , 4.77e-16 , 3.75e-15 , 3.69e-15 , 3.22e-15, 2.64e-15;
47, 5.62e-16 , 4.24e-16 , 2.73e-15 , 3.06e-15 , 3.25e-15, 2.33e-15;
48, 5.20e-16 , 4.20e-16 , 2.17e-15 , 2.53e-15 , 4.60e-15, 2.99e-15;
49, 3.69e-15 , 3.60e-15 , 2.30e-15 , 2.35e-15 , 7.24e-14, 6.75e-14;
50, 7.05e-16 , 7.13e-16 , 9.02e-15 , 8.84e-15 , 3.11e-14, 1.91e-14;
51, 4.09e-16 , 5.13e-16 , 2.52e-16 , 1.86e-16 , 4.78e-15, 4.02e-15;
52, 1.52e-16 , 2.50e-16 , 1.31e-15 , 1.86e-14 , 3.87e-15, 2.94e-15;
%-----------------------------------------------------------------;
% expm_testmats(1:end, 15)
%-----------------------------------------------------------------;
53, 1.63e-16 , 2.13e-17 , 6.85e-16 , 6.40e-16 , 8.04e-16, 5.21e-16;
54, 1.26e-16 , 1.99e-16 , 9.94e-16 , 1.15e-15 , 1.41e-15, 1.26e-15;
55, 5.48e-14 , 3.49e-15 , 4.30e-14 , 8.86e-15 , 2.07e-12, 2.16e-13;
56, 4.64e-18 , 2.36e-17 , 3.77e-15 , 4.32e-15 , 8.32e-16, 3.44e-16;
57, 2.33e-09 , 1.78e-09 , 1.14e-10 , 6.85e-11 , 1.26e-09, 7.53e-10;
58, 1.14e-16 , 2.80e-132, 4.58e-16 , 3.46e-16 , 6.12e-07, 2.63e-07;
59, 1.61e-10 , 1.91e-10 , 1.41e-16 , 1.89e-16 , 8.49e-09, 9.70e-09;
60, 1.74e-16 , 2.62e-16 , 2.03e-16 , 1.53e-15 , 3.08e-07, 1.32e-07;
61, 2.85e-16 , 7.30e-16 , 1.68e-15 , 2.11e-15 , 9.80e-16, 4.90e-16;
62, 3.88e-15 , 2.61e-15 , 4.29e-16 , 1.22e-16 , Inf , Inf ;
63, 4.98e-16 , 3.45e-16 , 2.93e-16 , 2.58e-16 , 5.76e-14, 4.47e-14;
64, 4.76e-17 , 9.33e-17 , 2.34e-17 , 8.29e-17 , 3.32e-15, 2.81e-15;
65, 7.93e-16 , 2.77e-16 , 1.76e-14 , 8.15e-15 , 2.66e-14, 1.74e-14;
66, 4.63e-16 , 4.44e-16 , 2.36e-16 , 4.83e-16 , 1.13e-14, 2.22e-14;
67, 2.67e-16 , 2.97e-16 , 8.19e-12 , 1.54e-10 , 2.97e-15, 2.92e-15;
68, 1.32e-16 , 1.50e-16 , 3.65e-16 , 6.89e-16 , 2.02e-15, 1.71e-15;
69, 3.14e-132, 9.00e-133, 3.14e-132, 9.00e-133, 6.18e-07, 2.65e-07;
70, 1.13e-16 , 2.09e-16 , 1.79e-15 , 2.94e-15 , 5.93e-16, 3.44e-16;
71, 2.12e-16 , 5.04e-16 , 1.19e-15 , 1.73e-15 , 1.50e-15, 7.41e-16;
72, 2.48e-10 , 1.12e-10 , 1.04e-16 , 1.32e-16 , 3.52e-09, 1.59e-09;
73, 5.16e-16 , 2.64e-16 , 3.25e-16 , 6.40e-16 , 4.05e-15, 2.98e-15;
74, 4.34e-19 , 6.71e-127, 9.64e-16 , 1.02e-15 , 1.51e-16, 5.04e-17;
75, 1.11e-16 , 3.33e-16 , 5.72e-15 , 5.67e-15 , 4.66e-21, 1.55e-21;
76, 1.64e-12 , 1.63e-12 , 9.07e-13 , 9.01e-13 , 1.21e-09, 1.20e-09;
77, 3.05e-14 , 1.91e-14 , 4.08e-16 , 2.41e-32 , Inf , Inf ;
78, 2.51e-14 , 1.87e-14 , 1.30e-13 , 2.22e-13 , 1.70e+38, 1.58e+29;
79, 1.38e-11 , 7.16e-12 , 9.79e-13 , 6.11e-13 , 5.64e-09, 2.53e-09;
80, NaN , NaN , NaN , NaN , NaN , NaN ;
81, 4.30e-11 , 2.64e-11 , 1.53e-11 , 1.64e-11 , 2.14e-10, 1.15e-10;
82, 1.85e-16 , 7.52e-17 , 4.17e-16 , 1.88e-15 , 2.69e-15, 1.77e-15;
83, 3.19e-13 , 3.29e-13 , 5.38e-13 , 4.96e-13 , 1.39e+66, 3.87e+46;
84, 2.57e-16 , 4.43e-16 , 3.89e-15 , 4.84e-15 , 3.44e-15, 1.29e-15;
%-----------------------------------------------------------------;
% logm_testmats(1:end, 15)
%-----------------------------------------------------------------;
85, 1.35e-09 , 9.60e-11 , 4.81e-13 , 2.94e-13 , 6.82e-09, 3.08e-09;
86, 1.79e-15 , 3.17e-15 , 3.72e-14 , 1.77e-14 , 4.80e-13, 2.30e-13;
87, 8.82e-16 , 4.25e-16 , 1.76e-16 , 2.83e-16 , 6.84e-07, 3.08e-07;
88, 2.24e-15 , 1.57e-15 , 5.59e-16 , 1.31e-16 , 2.13e-06, 7.48e-07;
89, 6.95e-24 , 2.52e-16 , 2.60e-15 , 8.67e-16 , 2.30e-16, 7.44e-17;
90, 2.64e-19 , 1.89e-16 , 9.50e-16 , 5.68e-16 , 7.22e-13, 2.98e-13;
91, 1.16e-16 , 2.24e-16 , 6.89e-24 , 6.67e-24 , 2.30e-16, 7.44e-17;
92, 1.05e-18 , 1.90e-16 , 2.02e-24 , 7.08e-25 , 7.22e-13, 2.98e-13
];
% Results when matrices are multiplied by scaling factor = 60.
sol2 = [%n, err_cA , err_sA , errfunmcA, errfunmsA, condfcA , condfsA
%------------------------------------------------------------------
% matrix(1:end, 15)*60
%------------------------------------------------------------------
01, 1.12e-15 , 1.22e-15 , 1.06e-15 , 1.08e-15 , 1.02e-14 , 9.26e-15;
02, 6.65e-11 , 4.20e-11 , 2.22e-11 , 1.90e-11 , 1.24e-10 , 8.75e-11;
03, 2.99e-15 , 2.63e-15 , 1.11e-14 , 9.43e-15 , 1.72e-14 , 1.40e-14;
04, 8.88e-16 , 7.02e-16 , 1.40e-08 , 6.33e-07 , 7.05e-14 , 6.30e-14;
05, 5.47e-15 , 5.28e-15 , 1.45e-15 , 1.65e-15 , NaN , NaN ;
06, 6.82e-15 , 6.63e-15 , 1.81e-14 , 1.83e-14 , 4.83e-14 , 4.66e-14;
07, 2.07e-14 , 2.04e-14 , 3.77e-15 , 3.72e-15 , NaN , NaN ;
08, 1.79e-15 , 1.70e-15 , 6.61e-15 , 6.30e-15 , 3.15e-14 , 2.81e-14;
09, 1.04e-15 , 1.01e-15 , 6.83e-15 , 6.14e-15 , 3.31e-14 , 3.09e-14;
10, 2.36e-15 , 2.41e-15 , 2.59e-14 , 2.57e-14 , NaN , NaN ;
11, 4.69e-16 , 2.94e-16 , 5.24e-11 , 9.04e-11 , 1.01e-14 , 9.09e-15;
12, 6.74e-15 , 6.51e-15 , 6.83e-14 , 6.67e-14 , 1.47e-06 , 2.04e-12;
13, 3.13e-15 , 2.98e-15 , 8.65e-15 , 8.32e-15 , 1.38e-14 , 1.28e-14;
14, 3.04e-15 , 2.71e-15 , 6.21e-15 , 5.71e-15 , 1.09e-14 , 1.03e-14;
15, 9.83e-16 , 1.15e-15 , 1.12e-14 , 1.16e-14 , 3.74e-14 , 3.30e-14;
16, 5.60e+279, 1.33e+278, 1.05e+56 , 1.81e+55 , NaN , NaN ;
17, NaN , NaN , NaN , NaN , NaN , NaN ;
18, 5.72e-16 , 6.23e-16 , 1.11e-16 , 1.85e-16 , 1.53e-14 , 1.41e-14;
19, 9.87e-16 , 8.44e-16 , 1.03e-12 , 3.71e-12 , 8.50e-15 , 8.37e-15;
20, 7.65e-16 , 7.95e-16 , 2.35e-15 , 2.25e-15 , 1.70e-14 , 1.59e-14;
21, NaN , NaN , NaN , NaN , NaN , NaN ;
22, 1.44e-15 , 1.42e-15 , 3.56e-16 , 3.06e-16 , 3.20e-14 , 3.06e-14;
23, 1.78e-15 , 1.60e-15 , 7.34e-15 , 8.06e-15 , 1.18e-14 , 1.16e-14;
24, 4.17e-16 , 3.60e-16 , 1.19e-14 , 1.09e-14 , 1.53e-14 , 1.42e-14;
25, 8.07e-16 , 7.88e-16 , 8.52e-16 , 1.27e-15 , NaN , NaN ;
26, 1.23e-15 , 1.22e-15 , 1.97e-15 , 2.13e-15 , NaN , NaN ;
27, 3.92e-15 , 3.37e-15 , 4.62e-15 , 4.21e-15 , 1.14e-14 , 1.01e-14;
28, 5.45e-15 , 5.42e-15 , 2.11e-14 , 2.03e-14 , 1.02e-14 , 1.09e-14;
29, 5.34e-15 , 5.58e-15 , 1.21e-15 , 9.59e-16 , 5.16e-14 , 4.99e-14;
30, 1.89e-15 , 1.83e-15 , 4.02e-15 , 3.68e-15 , 1.13e-14 , 1.00e-14;
31, 1.16e-15 , 1.24e-15 , 5.92e-15 , 5.97e-15 , 4.71e-15 , 4.14e-15;
32, 1.31e-15 , 1.26e-15 , 2.00e-15 , 2.01e-15 , 5.96e-15 , 5.93e-15;
33, 9.99e-16 , 9.62e-16 , 2.78e-14 , 2.61e-14 , 3.39e-14 , 3.22e-14;
34, 7.80e-16 , 7.11e-16 , 1.89e-15 , 2.53e-15 , 9.20e-15 , 9.32e-15;
35, 3.00e-15 , 3.01e-15 , 3.53e-15 , 3.27e-15 , 2.51e-14 , 2.37e-14;
36, 1.07e-14 , 1.05e-14 , 2.56e-15 , 2.64e-15 , 9.16e-15 , 1.08e-14;
37, 1.57e-15 , 1.46e-15 , 5.31e-15 , 4.78e-15 , 7.86e-15 , 9.06e-15;
38, 8.96e-16 , 7.89e-16 , 6.09e-15 , 6.52e-15 , 3.74e-15 , 3.65e-15;
39, 3.93e-15 , 3.76e-15 , 1.66e-15 , 1.83e-15 , 5.71e-15 , 5.54e-15;
40, 4.27e-16 , 5.43e-16 , 5.34e-14 , 3.61e-14 , 1.58e-14 , 1.63e-14;
41, 7.47e-16 , 8.17e-16 , 1.87e-15 , 2.13e-15 , 8.28e-15 , 7.67e-15;
42, NaN , NaN , NaN , NaN , NaN , NaN ;
43, 2.45e-14 , 2.44e-14 , 3.08e-15 , 2.61e-15 , NaN , NaN ;
44, NaN , NaN , NaN , NaN , NaN , NaN ;
45, 1.44e-15 , 1.45e-15 , 3.49e-15 , 3.60e-15 , 3.40e-14 , 3.24e-14;
46, 1.63e-15 , 1.69e-15 , 5.05e-15 , 4.71e-15 , 2.42e-14 , 2.16e-14;
47, 9.22e-16 , 9.68e-16 , 2.15e-15 , 2.10e-15 , 6.67e-15 , 6.36e-15;
48, 5.23e-15 , 5.52e-15 , 4.85e-15 , 5.77e-15 , 1.74e-14 , 1.89e-14;
49, 2.45e-14 , 2.44e-14 , 3.08e-15 , 2.61e-15 , NaN , NaN ;
50, 2.07e-14 , 2.06e-14 , 3.24e-14 , 3.15e-14 , 1.08e-12 , 1.04e-12;
51, 1.79e-15 , 1.92e-15 , 1.19e-15 , 9.94e-16 , 5.21e-15 , 6.48e-15;
52, 3.05e-16 , 2.07e-16 , 1.64e-15 , 1.62e-15 , 7.86e-14 , 6.20e-14;
%------------------------------------------------------------------;
% expm_testmats(1:end, 15)*60
%------------------------------------------------------------------;
53, 3.22e-16 , 4.58e-16 , 2.90e-16 , 2.10e-16 , 5.53e-15 , 5.25e-15;
54, 1.25e-15 , 9.35e-16 , 8.48e-15 , 8.29e-15 , 9.74e-14 , 9.84e-15;
55, 1.93e-13 , 7.32e-13 , 1.22e-13 , 1.98e-12 , 3.88e-12 , 3.42e-11;
56, 5.17e-16 , 3.53e-16 , 3.16e-10 , 5.03e-10 , 5.84e-15 , 5.38e-15;
57, 1.10e-06 , 5.11e-07 , 4.53e-09 , 2.15e-09 , 1.18e-07 , 5.63e-08;
58, 1.20e-133, 2.14e-16 , 2.12e-16 , 6.78e-134, 3.86e-03 , 1.11e-03;
59, 3.24e-09 , 8.64e-10 , 1.20e-16 , 2.50e-16 , 9.48e-07 , 5.99e-07;
60, 2.60e-15 , 2.26e-15 , 4.15e-16 , 4.69e-16 , 3.77e-04 , 2.31e-04;
61, 2.43e-15 , 2.27e-15 , 4.70e-15 , 4.21e-15 , 3.86e-15 , 4.28e-15;
62, 9.16e-14 , 8.37e-14 , 6.97e-14 , 8.12e-14 , NaN , NaN ;
63, 1.61e-16 , 1.20e-16 , 1.63e-16 , 2.41e-16 , 5.13e+04 , 3.04e+01;
64, 3.12e-16 , 2.67e-16 , 3.09e-17 , 3.45e-17 , 1.82e-14 , 1.53e-14;
65, 3.52e-12 , 9.94e-12 , 9.67e-11 , 2.26e-09 , 2.64e-11 , 8.85e-11;
66, 1.33e-15 , 1.92e-15 , 3.68e-15 , 2.34e-15 , 2.41e-13 , 2.25e-13;
67, 1.76e-15 , 2.15e-15 , 8.01e-16 , 7.55e-16 , 4.69e-13 , 3.98e-13;
68, 4.30e-16 , 3.06e-16 , 1.15e-16 , 1.74e-16 , 1.94e-15 , 1.85e-15;
69, 5.35e-134, 2.43e-134, 5.35e-134, 2.43e-134, 4.85e-03 , 1.32e-03;
70, 5.18e-16 , 1.59e-15 , 1.35e-15 , 3.07e-15 , 1.93e-14 , 3.92e-14;
71, 8.82e-16 , 7.99e-16 , 4.64e-15 , 3.21e-15 , 1.81e-14 , 1.83e-14;
72, 3.57e-12 , 1.56e-13 , 1.06e-16 , 2.42e-135, 1.63e-08 , 7.11e-10;
73, 2.54e-14 , 4.75e-14 , 3.02e-15 , 6.13e-15 , 4.38e-14 , 6.15e-14;
74, 3.94e-16 , 2.76e-16 , 5.44e-16 , 4.98e-16 , 3.35e-15 , 2.36e-15;
75, 1.36e-20 , 2.22e-16 , 2.37e-15 , 2.33e-15 , 2.80e-19 , 9.32e-20;
76, 3.26e-11 , 3.26e-11 , 7.96e-12 , 7.95e-12 , NaN , NaN ;
77, 2.17e-14 , 1.92e-14 , 2.93e-16 , 5.65e-34 , Inf , Inf ;
78, 5.15e-10 , 3.52e-10 , 4.33e-13 , 3.26e-13 , NaN , NaN ;
79, 7.08e-04 , 5.64e-04 , 4.10e-12 , 5.66e-12 , 3.97e-06 , 2.88e-06;
80, NaN , NaN , NaN , NaN , NaN , NaN ;
81, 5.59e+16 , 1.66e+16 , 5.12e-01 , 3.11e-01 , 8.12e+59 , 6.23e+48;
82, 5.23e-16 , 5.32e-15 , 2.54e-16 , 7.71e-17 , 6.75e-12 , 3.88e-11;
83, 2.35e-13 , 2.47e-13 , 7.46e-14 , 8.95e-14 , NaN , NaN ;
84, 2.49e-15 , 1.38e-15 , 6.73e-15 , 4.94e-15 , 1.02e-13 , 7.49e-14;
%------------------------------------------------------------------;
% logm_testmats(1:end, 15)*60
%------------------------------------------------------------------;
85, 9.69e-05 , 8.27e-05 , 1.16e-11 , 8.12e-12 , 4.59e-06 , 3.32e-06;
86, 7.40e-12 , 6.36e-12 , 7.79e-12 , 7.01e-12 , 1.30e-10 , 1.15e-10;
87, 1.58e-14 , 1.41e-14 , 2.72e-16 , 7.54e-23 , 1.44e-02 , 1.23e-03;
88, 3.39e-15 , 2.95e-15 , 1.41e-16 , 1.06e-25 , 4.26e+119, 1.64e+85;
89, 2.03e-16 , 4.02e-15 , 5.29e-15 , 6.89e-14 , 1.54e-15 , 8.78e-15;
90, 1.19e-16 , 9.98e-14 , 4.77e-16 , 9.14e-13 , 5.51e-10 , 1.76e-08;
91, 2.03e-16 , 2.37e-15 , 1.40e-17 , 1.25e-17 , 1.54e-15 , 8.78e-15;
92, 1.20e-16 , 1.79e-13 , 1.44e-20 , 3.42e-16 , 5.51e-10 , 1.76e-08
];
res_fcA = sol(1:end,[1,6]); res_fcA = sortrows(res_fcA,2,'descend');
res_fsA = sol(1:end,[1,7]); res_fsA = sortrows(res_fsA,2,'descend');
if (keep_sort_order == false)
res2_fcA = sol2(1:end,[1,6]); res2_fcA = sortrows(res2_fcA,2,'descend');
res2_fsA = sol2(1:end,[1,7]); res2_fsA = sortrows(res2_fsA,2,'descend');
end
idxs = res_fcA(:,1); % Matrix ID rearrangement after sorting w.r.t. condfcA
n = size(sol, 1);
IdxS = (6:n)-5;
IDXS = idxs(6:n);
fig1 = cfigure(15,15);
figure(fig1);
hold on;
box on;
%%% RECALL sol: [%n, err_cA, err_sA, errfunmcA, errfunmsA, condfcA, condfsA]
plot(IdxS, sol(IDXS,2), 'ko' , 'Linewidth', 1); % err_cA
plot(IdxS, sol(IDXS,4), 'bx' , 'Linewidth', 1); % err_funm_cA
plot(IdxS, sol(IDXS,6)/2, '-r', 'Linewidth', 2); % cond(fc,A)*eps/2 (u = eps/2)
set(gca, 'YLim', [10^(-20),10^(0)]);
set(gca, 'XLim', [0,90]);
set(gca,'yscale','log');
% lgd = legend('Alg. 5.2', 'funm', 'error estimate');
lgd = legend('Alg. 5.2', 'funm');
lgd.FontSize = 14;
% ylabel('Error','FontSize',16);
% xlabel('Matrix Id','FontSize',16);
fig_file = 'wave_kernel_err_fcA';
saveas(gcf, fig_file, 'epsc');
pdf_created = dos(['epstopdf ',fig_file,'.eps']);
if pdf_created == 0
eps_deleted = dos(['del ',fig_file,'.eps']);
end
hold off;
% if (keep_sort_order == false)
% % Matrix ID rearrangement after A<-A*60 and sorting w.r.t. condfcA
% idxs = res2_fcA(:,1);
% end
err_x = [IdxS ;IdxS ;NaN*(IdxS)]; err_x = reshape(err_x,[],1);
err_y = [sol(IDXS,2)' ;sol2(IDXS,2)';NaN*(IdxS)]; err_y = reshape(err_y,[],1);
fig3 = cfigure(15,15);
figure(fig3);
hold on;
box on;
%%% RECALL sol2: [%n, err_cA, err_sA, errfunmcA, errfunmsA, condfcA, condfsA]
plot(IdxS, sol2(IDXS,2) , 'ko', 'Linewidth', 1); % err_cA
plot(IdxS, sol2(IDXS,4) , 'bx', 'Linewidth', 1); % err_funm_cA
plot(IdxS, sol2(IDXS,6)/2, '-r', 'Linewidth', 2); % cond(fc,A)*eps/2 (u = eps/2)
if show_err_diff
plot(err_x,err_y,'.m-'); % illustrates change in err_cA when A <-- A*60
end
set(gca, 'YLim', [10^(-20),10^(0)]);
set(gca, 'XLim', [0,90]);
set(gca,'yscale','log');
% lgd = legend('Alg. 5.2', 'funm', 'error estimate');
lgd = legend('Alg. 5.2', 'funm');
lgd.FontSize = 14;
% ylabel('Error','FontSize',16);
% xlabel('Matrix Id','FontSize',16);
fig_file = 'wave_kernel_err_fcA60';
saveas(gcf, fig_file, 'epsc');
pdf_created = dos(['epstopdf ',fig_file,'.eps']);
if pdf_created == 0
eps_deleted = dos(['del ',fig_file,'.eps']);
end
hold off;
idxs = res_fsA(:,1); % Matrix ID rearrangement after sorting w.r.t. condfsA
IdxS = (6:n)-5;
IDXS = idxs(6:n);
fig2 = cfigure(15,15);
figure(fig2);
hold on;
box on;
%%% RECALL sol: [%n, err_cA, err_sA, errfunmcA, errfunmsA, condfcA, condfsA]
plot(IdxS, sol(IDXS,3) , 'ko', 'Linewidth', 1); % err_sA
plot(IdxS, sol(IDXS,5) , 'bx', 'Linewidth', 1); % err_funm_sA
plot(IdxS, sol(IDXS,7)/2, '-r', 'Linewidth', 2); % cond(fs,A)*eps/2 (u = eps/2)
set(gca, 'YLim', [10^(-20),10^(0)]);
set(gca, 'XLim', [0,90]);
set(gca,'yscale','log');
% lgd = legend('Alg. 5.2', 'funm', 'error estimate');
lgd = legend('Alg. 5.2', 'funm');
lgd.FontSize = 14;
% ylabel('Error','FontSize',16);
% xlabel('Matrix Id','FontSize',16);
fig_file = 'wave_kernel_err_fsA';
saveas(gcf, fig_file, 'epsc');
pdf_created = dos(['epstopdf ',fig_file,'.eps']);
if pdf_created == 0
eps_deleted = dos(['del ',fig_file,'.eps']);
end
hold off;
% if (keep_sort_order == false)
% % Matrix ID rearrangement after A<-A*60 and sorting w.r.t. condfsA
% idxs = res2_fsA(:,1);
% end
err_y = [sol(IDXS,3)' ;sol2(IDXS,3)';NaN*(IdxS)]; err_y = reshape(err_y,[],1);
fig4 = cfigure(15,15);
figure(fig4);
hold on;
box on;
%%% RECALL sol2: [%n, err_cA, err_sA, errfunmcA, errfunmsA, condfcA, condfsA]
plot(IdxS, sol2(IDXS,3) , 'ko', 'Linewidth', 1); % err_sA
plot(IdxS, sol2(IDXS,5) , 'bx', 'Linewidth', 1); % err_funm_sA
plot(IdxS, sol2(IDXS,7)/2, '-r', 'Linewidth', 2); % cond(fs,A)*eps/2 (u = eps/2)
if show_err_diff
plot(err_x,err_y,'.m-'); % illustrates change in err_sA when A <-- A*60
end
set(gca, 'YLim', [10^(-20),10^(0)]);
set(gca, 'XLim', [0,90]);
set(gca,'yscale','log');
% lgd = legend('Alg. 5.2', 'funm', 'error estimate');
lgd = legend('Alg. 5.2', 'funm');
lgd.FontSize = 14;
% ylabel('Error','FontSize',16);
% xlabel('Matrix Id','FontSize',16);
fig_file = 'wave_kernel_err_fsA60';
saveas(gcf, fig_file, 'epsc');
pdf_created = dos(['epstopdf ',fig_file,'.eps']);
if pdf_created == 0
eps_deleted = dos(['del ',fig_file,'.eps']);
end
hold off;