% 1. Priblizne reseni SLR
% 2. Demonstrace uziti iteracnich metod
load LRmat2
A
A =
     5    -9     5
     2     3     3
     1     8     0
     1    -2     1
b
b =
     1
     2
     1
     0
rank(A)
ans =
     3
rank([A,b])
ans =
     4
% Hodnosti jsou ruzne, takze system nema dle Frobeniovy vety reseni.
% Budeme proto hledat priblizne MNC-reseni:
% Resime soustavu A1*x=b1, kde A1=A.'*A a b1=A.'*b, ktera je vzdy resitelna:
A1 = A.'*A
A1 =
    31   -33    32
   -33   158   -38
    32   -38    35
b1 = A'*b
b1 =
    10
     5
    11
rank(A1)
ans =
     3
rank([A1,b1])
ans =
     3
% 3 - 3 = 0: Soustava ma jedine reseni:
x = A1\b1
x =
   -0.1806
    0.1478
    0.6399
A*x
ans =
    0.9661
    2.0020
    1.0020
    0.1636
b
b =
     1
     2
     1
     0
% Obdrzeli jsme priblizne reseni s minimalni normou odchylky od prave strany:
r=A*x-b
r =
   -0.0339
    0.0020
    0.0020
    0.1636
norm(r)
ans =
    0.1672
% neboli
sqrt(sum(r.^2))
ans =
    0.1672
% Jeste jinak:
sqrt(r'*r)
ans =
    0.1672
diary off
% Zkusme resit tuto soustavu iteracne:
% Matice A1 neni bohuzel diagonalne dominantni a ani radkovymi
% ci sloupcovymi permutacemi se na takovou matici neda zrejme prevest.
% Zkusime Jacobiho metodu:
N=diag(diag(A1))
N =
    31     0     0
     0   158     0
     0     0    35
M=N-A1
M =
     0    33   -32
    33     0    38
   -32    38     0
G=inv(N)*M
G =
         0    1.0645   -1.0323
    0.2089         0    0.2405
   -0.9143    1.0857         0
g=inv(N)*b1
g =
    0.3226
    0.0316
    0.3143
k=0; x=zeros(3,1)  %pocatecni odhad
x =
     0
     0
     0
% iterace po deseti:
for i=1:10, k=k+1,x=G*x+g;x.', end
k =
     1
ans =
    0.3226    0.0316    0.3143
k =
     2
ans =
    0.0318    0.1746    0.0537
k =
     3
ans =
    0.4530    0.0512    0.4747
k =
     4
ans =
   -0.1130    0.2404   -0.0443
k =
     5
ans =
    0.6243   -0.0026    0.6786
k =
     6
ans =
   -0.3807    0.3252   -0.2593
k =
     7
ans =
    0.9364   -0.1102    1.0155
k =
     8
ans =
   -0.8430    0.4715   -0.6616
k =
     9
ans =
    1.5074   -0.3035    1.5969
k =
    10
ans =
   -1.6489    0.7305   -1.3934
for i=1:10, k=k+1,x=G*x+g;x.', end
k =
    11
ans =
    2.5386   -0.6479    2.6150
k =
    12
ans =
   -3.0665    1.1908   -2.7101
k =
    13
ans =
    4.3877   -1.2606    4.4108
k =
    14
ans =
   -5.5724    2.0089   -5.0660
k =
    15
ans =
    7.6905   -2.3506    7.5901
k =
    16
ans =
  -10.0147    3.4634   -9.2692
k =
    17
ans =
   13.5776   -4.2893   13.2308
k =
    18
ans =
  -17.9011    6.0496  -16.7565
k =
    19
ans =
   24.0594   -7.7372   23.2491
k =
    20
ans =
  -31.9129   10.6483  -30.0833
for i=1:10, k=k+1,x=G*x+g;x.', end
k =
    21
ans =
   42.7116  -13.8689   41.0527
k =
    22
ans =
  -56.8181   18.8259  -53.7940
k =
    23
ans =
   75.8923  -24.7732   72.7018
k =
    24
ans =
 -101.0960   33.3678  -95.9696
k =
    25
ans =
  134.9086  -44.1646  128.9728
k =
    26
ans =
 -179.8246   59.2275 -170.9809
k =
    27
ans =
  239.8677  -78.6486  229.0295
k =
    28
ans =
 -319.8178  105.2136 -304.3833
k =
    29
ans =
  426.5263 -139.9718  406.9510
k =
    30
ans =
 -568.7582  186.9905 -541.6220
for i=1:10, k=k+1,x=G*x+g;x.', end
k =
    31
ans =
  758.4707 -249.0231  723.3401
k =
    32
ans =
  1.0e+003 *
   -1.0114    0.3324   -0.9635
k =
    33
ans =
  1.0e+003 *
    1.3488   -0.4429    1.2860
k =
    34
ans =
  1.0e+003 *
   -1.7987    0.5910   -1.7138
k =
    35
ans =
  1.0e+003 *
    2.3985   -0.7878    2.2865
k =
    36
ans =
  1.0e+003 *
   -3.1985    1.0509   -3.0480
k =
    37
ans =
  1.0e+003 *
    4.2653   -1.4011    4.0657
k =
    38
ans =
  1.0e+003 *
   -5.6880    1.8687   -5.4206
k =
    39
ans =
  1.0e+003 *
    7.5850   -2.4916    7.2296
k =
    40
ans =
  1.0e+004 *
   -1.0115    0.3323   -0.9640
% Zrejme nekonverguje
% Zkusme jiny pocatecni odhad blize k presnemu reseni:
k=0; x=[-0.1;0.1;0.5]  %pocatecni odhad
x =
   -0.1000
    0.1000
    0.5000
for i=1:10, k=k+1,x=G*x+g;x.', end
k =
     1
ans =
   -0.0871    0.1310    0.5143
k =
     2
ans =
   -0.0688    0.1371    0.5362
k =
     3
ans =
   -0.0849    0.1462    0.5261
k =
     4
ans =
   -0.0649    0.1405    0.5506
k =
     5
ans =
   -0.0963    0.1505    0.5261
k =
     6
ans =
   -0.0602    0.1381    0.5658
k =
     7
ans =
   -0.1145    0.1551    0.5192
k =
     8
ans =
   -0.0482    0.1326    0.5874
k =
     9
ans =
   -0.1426    0.1628    0.5024
k =
    10
ans =
   -0.0226    0.1227    0.6215
for i=1:10, k=k+1,x=G*x+g;x.', end
k =
    11
ans =
   -0.1884    0.1764    0.4682
k =
    12
ans =
    0.0271    0.1049    0.6780
k =
    13
ans =
   -0.2656    0.2004    0.4034
k =
    14
ans =
    0.1194    0.0732    0.7747
k =
    15
ans =
   -0.3992    0.2429    0.2846
k =
    16
ans =
    0.2874    0.0167    0.9430
k =
    17
ans =
   -0.6330    0.3185    0.0697
k =
    18
ans =
    0.5897   -0.0838    1.2388
k =
    19
ans =
   -1.0454    0.4527   -0.3158
k =
    20
ans =
    1.1305   -0.2626    1.7616
for i=1:10, k=k+1,x=G*x+g;x.', end
k =
    21
ans =
   -1.7754    0.6914   -1.0045
k =
    22
ans =
    2.0956   -0.5808    2.6883
k =
    23
ans =
   -3.0706    1.1159   -2.2322
k =
    24
ans =
    3.8146   -1.1465    4.3332
k =
    25
ans =
   -5.3709    1.8705   -4.4182
k =
    26
ans =
    6.8745   -2.1527    7.2557
k =
    27
ans =
   -9.4588    3.2125   -8.3083
k =
    28
ans =
   12.3186   -3.9421   12.4502
k =
    29
ans =
  -16.7257    5.5989  -15.2285
k =
    30
ans =
   22.0024   -7.1242   21.6852
for i=1:10, k=k+1,x=G*x+g;x.', end
k =
    31
ans =
  -29.6460    9.8425  -27.5371
k =
    32
ans =
   39.2254  -12.7831   38.1053
k =
    33
ans =
  -52.6197   17.3889  -49.4277
k =
    34
ans =
   69.8555  -22.8462   67.3031
k =
    35
ans =
  -93.4718   30.8085  -88.3581
k =
    36
ans =
  124.3271  -40.7416  119.2235
k =
    37
ans =
 -166.1169   54.6727 -157.5900
k =
    38
ans =
  221.1961  -72.5651  211.5515
k =
    39
ans =
 -295.2999   97.1103 -280.7071
k =
    40
ans =
  393.4602 -129.1567  375.7368
for i=1:10, k=k+1,x=G*x+g;x.', end
k =
    41
ans =
 -525.0242  172.5771 -499.6481
k =
    42
ans =
  699.7994 -229.7938  667.7058
k =
    43
ans =
 -933.5414  306.7798 -888.9928
k =
    44
ans =
  1.0e+003 *
    1.2446   -0.4088    1.1869
k =
    45
ans =
  1.0e+003 *
   -1.6600    0.5454   -1.5814
k =
    46
ans =
  1.0e+003 *
    2.2133   -0.7270    2.1102
k =
    47
ans =
  1.0e+003 *
   -2.9519    0.9698   -2.8126
k =
    48
ans =
  1.0e+003 *
    3.9361   -1.2930    3.7521
k =
    49
ans =
  1.0e+003 *
   -5.2492    1.7245   -5.0022
k =
    50
ans =
  1.0e+003 *
    6.9996   -2.2994    6.6719
% Ani to nepomohlo
% Vyzkousime Gauss-Seidelovu metodu:
N=tril(A1)
N =
    31     0     0
   -33   158     0
    32   -38    35
M=N-A1
M =
     0    33   -32
     0     0    38
     0     0     0
G=inv(N)*M
G =
         0    1.0645   -1.0323
         0    0.2223    0.0249
         0   -0.7319    0.9708
g=inv(N)*b1
g =
    0.3226
    0.0990
    0.1269
k=0; x=zeros(3,1)  %pocatecni odhad
x =
     0
     0
     0
for i=1:10, k=k+1,x=G*x+g;x.', end
k =
     1
ans =
    0.3226    0.0990    0.1269
k =
     2
ans =
    0.2970    0.1242    0.1776
k =
     3
ans =
    0.2715    0.1311    0.2083
k =
     4
ans =
    0.2470    0.1333    0.2332
k =
     5
ans =
    0.2238    0.1345    0.2557
k =
     6
ans =
    0.2018    0.1353    0.2766
k =
     7
ans =
    0.1810    0.1360    0.2964
k =
     8
ans =
    0.1614    0.1366    0.3151
k =
     9
ans =
    0.1428    0.1372    0.3328
k =
    10
ans =
    0.1252    0.1378    0.3495
for i=1:10, k=k+1,x=G*x+g;x.', end
k =
    11
ans =
    0.1085    0.1384    0.3653
k =
    12
ans =
    0.0928    0.1389    0.3802
k =
    13
ans =
    0.0779    0.1394    0.3943
k =
    14
ans =
    0.0639    0.1398    0.4077
k =
    15
ans =
    0.0506    0.1403    0.4203
k =
    16
ans =
    0.0380    0.1407    0.4323
k =
    17
ans =
    0.0261    0.1411    0.4436
k =
    18
ans =
    0.0149    0.1414    0.4542
k =
    19
ans =
    0.0043    0.1418    0.4643
k =
    20
ans =
   -0.0058    0.1421    0.4739
for i=1:10, k=k+1,x=G*x+g;x.', end
k =
    21
ans =
   -0.0153    0.1424    0.4829
k =
    22
ans =
   -0.0243    0.1427    0.4914
k =
    23
ans =
   -0.0328    0.1430    0.4995
k =
    24
ans =
   -0.0408    0.1433    0.5072
k =
    25
ans =
   -0.0484    0.1435    0.5144
k =
    26
ans =
   -0.0556    0.1437    0.5212
k =
    27
ans =
   -0.0624    0.1440    0.5277
k =
    28
ans =
   -0.0688    0.1442    0.5338
k =
    29
ans =
   -0.0749    0.1444    0.5395
k =
    30
ans =
   -0.0807    0.1446    0.5450
for i=1:10, k=k+1,x=G*x+g;x.', end
k =
    31
ans =
   -0.0861    0.1447    0.5502
k =
    32
ans =
   -0.0912    0.1449    0.5550
k =
    33
ans =
   -0.0961    0.1451    0.5597
k =
    34
ans =
   -0.1007    0.1452    0.5640
k =
    35
ans =
   -0.1051    0.1454    0.5681
k =
    36
ans =
   -0.1092    0.1455    0.5720
k =
    37
ans =
   -0.1130    0.1456    0.5757
k =
    38
ans =
   -0.1167    0.1457    0.5792
k =
    39
ans =
   -0.1202    0.1458    0.5825
k =
    40
ans =
   -0.1235    0.1460    0.5856
for i=1:10, k=k+1,x=G*x+g;x.', end
k =
    41
ans =
   -0.1266    0.1461    0.5886
k =
    42
ans =
   -0.1295    0.1462    0.5914
k =
    43
ans =
   -0.1323    0.1462    0.5940
k =
    44
ans =
   -0.1349    0.1463    0.5965
k =
    45
ans =
   -0.1374    0.1464    0.5989
k =
    46
ans =
   -0.1398    0.1465    0.6011
k =
    47
ans =
   -0.1420    0.1466    0.6032
k =
    48
ans =
   -0.1441    0.1466    0.6052
k =
    49
ans =
   -0.1461    0.1467    0.6071
k =
    50
ans =
   -0.1480    0.1468    0.6089
for i=1:10, k=k+1,x=G*x+g;x.', end
k =
    51
ans =
   -0.1497    0.1468    0.6106
k =
    52
ans =
   -0.1514    0.1469    0.6122
k =
    53
ans =
   -0.1530    0.1469    0.6137
k =
    54
ans =
   -0.1545    0.1470    0.6151
k =
    55
ans =
   -0.1559    0.1470    0.6165
k =
    56
ans =
   -0.1573    0.1471    0.6177
k =
    57
ans =
   -0.1585    0.1471    0.6189
k =
    58
ans =
   -0.1597    0.1471    0.6201
k =
    59
ans =
   -0.1609    0.1472    0.6212
k =
    60
ans =
   -0.1619    0.1472    0.6222
for i=1:10, k=k+1,x=G*x+g;x.', end
k =
    61
ans =
   -0.1630    0.1472    0.6231
k =
    62
ans =
   -0.1639    0.1473    0.6241
k =
    63
ans =
   -0.1648    0.1473    0.6249
k =
    64
ans =
   -0.1657    0.1473    0.6257
k =
    65
ans =
   -0.1665    0.1474    0.6265
k =
    66
ans =
   -0.1673    0.1474    0.6272
k =
    67
ans =
   -0.1680    0.1474    0.6279
k =
    68
ans =
   -0.1687    0.1474    0.6286
k =
    69
ans =
   -0.1693    0.1475    0.6292
k =
    70
ans =
   -0.1699    0.1475    0.6298
for i=1:10, k=k+1,x=G*x+g;x.', end
k =
    71
ans =
   -0.1705    0.1475    0.6303
k =
    72
ans =
   -0.1711    0.1475    0.6308
k =
    73
ans =
   -0.1716    0.1475    0.6313
k =
    74
ans =
   -0.1721    0.1475    0.6318
k =
    75
ans =
   -0.1725    0.1476    0.6322
k =
    76
ans =
   -0.1730    0.1476    0.6327
k =
    77
ans =
   -0.1734    0.1476    0.6331
k =
    78
ans =
   -0.1738    0.1476    0.6334
k =
    79
ans =
   -0.1742    0.1476    0.6338
k =
    80
ans =
   -0.1745    0.1476    0.6341
for i=1:10, k=k+1,x=G*x+g;x.', end
k =
    81
ans =
   -0.1748    0.1476    0.6344
k =
    82
ans =
   -0.1752    0.1476    0.6347
k =
    83
ans =
   -0.1755    0.1477    0.6350
k =
    84
ans =
   -0.1757    0.1477    0.6353
k =
    85
ans =
   -0.1760    0.1477    0.6355
k =
    86
ans =
   -0.1762    0.1477    0.6358
k =
    87
ans =
   -0.1765    0.1477    0.6360
k =
    88
ans =
   -0.1767    0.1477    0.6362
k =
    89
ans =
   -0.1769    0.1477    0.6364
k =
    90
ans =
   -0.1771    0.1477    0.6366
for i=1:10, k=k+1,x=G*x+g;x.', end
k =
    91
ans =
   -0.1773    0.1477    0.6368
k =
    92
ans =
   -0.1775    0.1477    0.6370
k =
    93
ans =
   -0.1777    0.1477    0.6371
k =
    94
ans =
   -0.1778    0.1477    0.6373
k =
    95
ans =
   -0.1780    0.1477    0.6374
k =
    96
ans =
   -0.1781    0.1477    0.6375
k =
    97
ans =
   -0.1783    0.1477    0.6377
k =
    98
ans =
   -0.1784    0.1478    0.6378
k =
    99
ans =
   -0.1785    0.1478    0.6379
k =
   100
ans =
   -0.1786    0.1478    0.6380
for i=1:10, k=k+1,x=G*x+g;x.', end
k =
   101
ans =
   -0.1787    0.1478    0.6381
k =
   102
ans =
   -0.1788    0.1478    0.6382
k =
   103
ans =
   -0.1789    0.1478    0.6383
k =
   104
ans =
   -0.1790    0.1478    0.6384
k =
   105
ans =
   -0.1791    0.1478    0.6385
k =
   106
ans =
   -0.1792    0.1478    0.6386
k =
   107
ans =
   -0.1793    0.1478    0.6386
k =
   108
ans =
   -0.1793    0.1478    0.6387
k =
   109
ans =
   -0.1794    0.1478    0.6388
k =
   110
ans =
   -0.1795    0.1478    0.6388
for i=1:10, k=k+1,x=G*x+g;x.', end
k =
   111
ans =
   -0.1795    0.1478    0.6389
k =
   112
ans =
   -0.1796    0.1478    0.6389
k =
   113
ans =
   -0.1796    0.1478    0.6390
k =
   114
ans =
   -0.1797    0.1478    0.6390
k =
   115
ans =
   -0.1798    0.1478    0.6391
k =
   116
ans =
   -0.1798    0.1478    0.6391
k =
   117
ans =
   -0.1798    0.1478    0.6392
k =
   118
ans =
   -0.1799    0.1478    0.6392
k =
   119
ans =
   -0.1799    0.1478    0.6393
k =
   120
ans =
   -0.1800    0.1478    0.6393
for i=1:10, k=k+1,x=G*x+g;x.', end
k =
   121
ans =
   -0.1800    0.1478    0.6393
k =
   122
ans =
   -0.1800    0.1478    0.6394
k =
   123
ans =
   -0.1801    0.1478    0.6394
k =
   124
ans =
   -0.1801    0.1478    0.6394
k =
   125
ans =
   -0.1801    0.1478    0.6394
k =
   126
ans =
   -0.1801    0.1478    0.6395
k =
   127
ans =
   -0.1802    0.1478    0.6395
k =
   128
ans =
   -0.1802    0.1478    0.6395
k =
   129
ans =
   -0.1802    0.1478    0.6395
k =
   130
ans =
   -0.1802    0.1478    0.6396
for i=1:10, k=k+1,x=G*x+g;x.', end
k =
   131
ans =
   -0.1803    0.1478    0.6396
k =
   132
ans =
   -0.1803    0.1478    0.6396
k =
   133
ans =
   -0.1803    0.1478    0.6396
k =
   134
ans =
   -0.1803    0.1478    0.6396
k =
   135
ans =
   -0.1803    0.1478    0.6396
k =
   136
ans =
   -0.1803    0.1478    0.6397
k =
   137
ans =
   -0.1804    0.1478    0.6397
k =
   138
ans =
   -0.1804    0.1478    0.6397
k =
   139
ans =
   -0.1804    0.1478    0.6397
k =
   140
ans =
   -0.1804    0.1478    0.6397
for i=1:10, k=k+1,x=G*x+g;x.', end
k =
   141
ans =
   -0.1804    0.1478    0.6397
k =
   142
ans =
   -0.1804    0.1478    0.6397
k =
   143
ans =
   -0.1804    0.1478    0.6397
k =
   144
ans =
   -0.1804    0.1478    0.6398
k =
   145
ans =
   -0.1805    0.1478    0.6398
k =
   146
ans =
   -0.1805    0.1478    0.6398
k =
   147
ans =
   -0.1805    0.1478    0.6398
k =
   148
ans =
   -0.1805    0.1478    0.6398
k =
   149
ans =
   -0.1805    0.1478    0.6398
k =
   150
ans =
   -0.1805    0.1478    0.6398
for i=1:10, k=k+1,x=G*x+g;x.', end
k =
   151
ans =
   -0.1805    0.1478    0.6398
k =
   152
ans =
   -0.1805    0.1478    0.6398
k =
   153
ans =
   -0.1805    0.1478    0.6398
k =
   154
ans =
   -0.1805    0.1478    0.6398
k =
   155
ans =
   -0.1805    0.1478    0.6398
k =
   156
ans =
   -0.1805    0.1478    0.6398
k =
   157
ans =
   -0.1805    0.1478    0.6398
k =
   158
ans =
   -0.1805    0.1478    0.6398
k =
   159
ans =
   -0.1805    0.1478    0.6398
k =
   160
ans =
   -0.1805    0.1478    0.6398
for i=1:10, k=k+1,x=G*x+g;x.', end
k =
   161
ans =
   -0.1805    0.1478    0.6399
k =
   162
ans =
   -0.1806    0.1478    0.6399
k =
   163
ans =
   -0.1806    0.1478    0.6399
k =
   164
ans =
   -0.1806    0.1478    0.6399
k =
   165
ans =
   -0.1806    0.1478    0.6399
k =
   166
ans =
   -0.1806    0.1478    0.6399
k =
   167
ans =
   -0.1806    0.1478    0.6399
k =
   168
ans =
   -0.1806    0.1478    0.6399
k =
   169
ans =
   -0.1806    0.1478    0.6399
k =
   170
ans =
   -0.1806    0.1478    0.6399
for i=1:10, k=k+1,x=G*x+g;x.', end
k =
   171
ans =
   -0.1806    0.1478    0.6399
k =
   172
ans =
   -0.1806    0.1478    0.6399
k =
   173
ans =
   -0.1806    0.1478    0.6399
k =
   174
ans =
   -0.1806    0.1478    0.6399
k =
   175
ans =
   -0.1806    0.1478    0.6399
k =
   176
ans =
   -0.1806    0.1478    0.6399
k =
   177
ans =
   -0.1806    0.1478    0.6399
k =
   178
ans =
   -0.1806    0.1478    0.6399
k =
   179
ans =
   -0.1806    0.1478    0.6399
k =
   180
ans =
   -0.1806    0.1478    0.6399
for i=1:10, k=k+1,x=G*x+g;x.', end
k =
   181
ans =
   -0.1806    0.1478    0.6399
k =
   182
ans =
   -0.1806    0.1478    0.6399
k =
   183
ans =
   -0.1806    0.1478    0.6399
k =
   184
ans =
   -0.1806    0.1478    0.6399
k =
   185
ans =
   -0.1806    0.1478    0.6399
k =
   186
ans =
   -0.1806    0.1478    0.6399
k =
   187
ans =
   -0.1806    0.1478    0.6399
k =
   188
ans =
   -0.1806    0.1478    0.6399
k =
   189
ans =
   -0.1806    0.1478    0.6399
k =
   190
ans =
   -0.1806    0.1478    0.6399
for i=1:10, k=k+1,x=G*x+g;x.', end
k =
   191
ans =
   -0.1806    0.1478    0.6399
k =
   192
ans =
   -0.1806    0.1478    0.6399
k =
   193
ans =
   -0.1806    0.1478    0.6399
k =
   194
ans =
   -0.1806    0.1478    0.6399
k =
   195
ans =
   -0.1806    0.1478    0.6399
k =
   196
ans =
   -0.1806    0.1478    0.6399
k =
   197
ans =
   -0.1806    0.1478    0.6399
k =
   198
ans =
   -0.1806    0.1478    0.6399
k =
   199
ans =
   -0.1806    0.1478    0.6399
k =
   200
ans =
   -0.1806    0.1478    0.6399
for i=1:10, k=k+1,x=G*x+g;x.', end
k =
   201
ans =
   -0.1806    0.1478    0.6399
k =
   202
ans =
   -0.1806    0.1478    0.6399
k =
   203
ans =
   -0.1806    0.1478    0.6399
k =
   204
ans =
   -0.1806    0.1478    0.6399
k =
   205
ans =
   -0.1806    0.1478    0.6399
k =
   206
ans =
   -0.1806    0.1478    0.6399
k =
   207
ans =
   -0.1806    0.1478    0.6399
k =
   208
ans =
   -0.1806    0.1478    0.6399
k =
   209
ans =
   -0.1806    0.1478    0.6399
k =
   210
ans =
   -0.1806    0.1478    0.6399
format long
for i=1:10, k=k+1,x=G*x+g;x.', end
k =
   211
ans =
  -0.18060895193332   0.14782595545833   0.63991065055093
k =
   212
ans =
  -0.18060917056468   0.14782596260950   0.63991085820659
k =
   213
ans =
  -0.18060937730637   0.14782596937177   0.63991105456946
k =
   214
ans =
  -0.18060957280498   0.14782597576630   0.63991124025367
k =
   215
ans =
  -0.18060975767193   0.14782598181308   0.63991141583996
k =
   216
ans =
  -0.18060993248539   0.14782598753102   0.63991158187746
k =
   217
ans =
  -0.18061009779210   0.14782599293800   0.63991173888547
k =
   218
ans =
  -0.18061025410906   0.14782599805094   0.63991188735502
k =
   219
ans =
  -0.18061040192515   0.14782600288583   0.63991202775046
k =
   220
ans =
  -0.18061054170266   0.14782600745778   0.63991216051088
for i=1:10, k=k+1,x=G*x+g;x.', end
k =
   221
ans =
  -0.18061067387876   0.14782601178111   0.63991228605149
k =
   222
ans =
  -0.18061079886682   0.14782601586932   0.63991240476492
k =
   223
ans =
  -0.18061091705774   0.14782601973520   0.63991251702243
k =
   224
ans =
  -0.18061102882117   0.14782602339085   0.63991262317513
k =
   225
ans =
  -0.18061113450666   0.14782602684769   0.63991272355501
k =
   226
ans =
  -0.18061123444472   0.14782603011655   0.63991281847600
k =
   227
ans =
  -0.18061132894793   0.14782603320763   0.63991290823497
k =
   228
ans =
  -0.18061141831184   0.14782603613062   0.63991299311264
k =
   229
ans =
  -0.18061150281594   0.14782603889465   0.63991307337448
k =
   230
ans =
  -0.18061158272451   0.14782604150836   0.63991314927149
for i=1:10, k=k+1,x=G*x+g;x.', end
k =
   231
ans =
  -0.18061165828748   0.14782604397994   0.63991322104105
k =
   232
ans =
  -0.18061172974115   0.14782604631710   0.63991328890762
k =
   233
ans =
  -0.18061179730902   0.14782604852716   0.63991335308345
k =
   234
ans =
  -0.18061186120239   0.14782605061704   0.63991341376926
k =
   235
ans =
  -0.18061192162109   0.14782605259326   0.63991347115483
k =
   236
ans =
  -0.18061197875409   0.14782605446202   0.63991352541964
k =
   237
ans =
  -0.18061203278007   0.14782605622914   0.63991357673341
k =
   238
ans =
  -0.18061208386799   0.14782605790017   0.63991362525662
k =
   239
ans =
  -0.18061213217763   0.14782605948032   0.63991367114103
k =
   240
ans =
  -0.18061217786008   0.14782606097453   0.63991371453014
for i=1:10, k=k+1,x=G*x+g;x.', end
k =
   241
ans =
  -0.18061222105822   0.14782606238749   0.63991375555966
k =
   242
ans =
  -0.18061226190715   0.14782606372361   0.63991379435789
k =
   243
ans =
  -0.18061230053462   0.14782606498707   0.63991383104619
k =
   244
ans =
  -0.18061233706144   0.14782606618182   0.63991386573929
k =
   245
ans =
  -0.18061237160185   0.14782606731160   0.63991389854571
k =
   246
ans =
  -0.18061240426387   0.14782606837993   0.63991392956804
k =
   247
ans =
  -0.18061243514966   0.14782606939017   0.63991395890330
k =
   248
ans =
  -0.18061246435581   0.14782607034547   0.63991398664325
k =
   249
ans =
  -0.18061249197366   0.14782607124881   0.63991401287463
k =
   250
ans =
  -0.18061251808959   0.14782607210303   0.63991403767949
for i=1:10, k=k+1,x=G*x+g;x.', end
k =
   251
ans =
  -0.18061254278528   0.14782607291080   0.63991406113541
k =
   252
ans =
  -0.18061256613796   0.14782607367464   0.63991408331574
k =
   253
ans =
  -0.18061258822066   0.14782607439694   0.63991410428985
k =
   254
ans =
  -0.18061260910246   0.14782607507996   0.63991412412335
k =
   255
ans =
  -0.18061262884866   0.14782607572583   0.63991414287825
k =
   256
ans =
  -0.18061264752102   0.14782607633658   0.63991416061322
k =
   257
ans =
  -0.18061266517793   0.14782607691412   0.63991417738372
k =
   258
ans =
  -0.18061268187462   0.14782607746025   0.63991419324221
k =
   259
ans =
  -0.18061269766331   0.14782607797668   0.63991420823827
k =
   260
ans =
  -0.18061271259337   0.14782607846502   0.63991422241881
for i=1:10, k=k+1,x=G*x+g;x.', end
k =
   261
ans =
  -0.18061272671150   0.14782607892681   0.63991423582819
k =
   262
ans =
  -0.18061274006185   0.14782607936348   0.63991424850833
k =
   263
ans =
  -0.18061275268618   0.14782607977641   0.63991426049889
k =
   264
ans =
  -0.18061276462397   0.14782608016688   0.63991427183739
k =
   265
ans =
  -0.18061277591256   0.14782608053612   0.63991428255927
k =
   266
ans =
  -0.18061278658725   0.14782608088527   0.63991429269807
k =
   267
ans =
  -0.18061279668142   0.14782608121544   0.63991430228549
k =
   268
ans =
  -0.18061280622665   0.14782608152765   0.63991431135154
k =
   269
ans =
  -0.18061281525279   0.14782608182289   0.63991431992455
k =
   270
ans =
  -0.18061282378807   0.14782608210207   0.63991432803134
for i=1:10, k=k+1,x=G*x+g;x.', end
k =
   271
ans =
  -0.18061283185918   0.14782608236606   0.63991433569726
k =
   272
ans =
  -0.18061283949136   0.14782608261570   0.63991434294630
k =
   273
ans =
  -0.18061284670849   0.14782608285177   0.63991434980111
k =
   274
ans =
  -0.18061285353314   0.14782608307499   0.63991435628315
k =
   275
ans =
  -0.18061285998664   0.14782608328608   0.63991436241267
k =
   276
ans =
  -0.18061286608919   0.14782608348568   0.63991436820886
k =
   277
ans =
  -0.18061287185987   0.14782608367444   0.63991437368984
k =
   278
ans =
  -0.18061287731673   0.14782608385292   0.63991437887275
k =
   279
ans =
  -0.18061288247683   0.14782608402170   0.63991438377381
k =
   280
ans =
  -0.18061288735631   0.14782608418131   0.63991438840833
for i=1:10, k=k+1,x=G*x+g;x.', end
k =
   281
ans =
  -0.18061289197043   0.14782608433223   0.63991439279082
k =
   282
ans =
  -0.18061289633363   0.14782608447494   0.63991439693497
k =
   283
ans =
  -0.18061290045955   0.14782608460990   0.63991440085376
k =
   284
ans =
  -0.18061290436109   0.14782608473751   0.63991440455944
k =
   285
ans =
  -0.18061290805045   0.14782608485819   0.63991440806359
k =
   286
ans =
  -0.18061291153918   0.14782608497230   0.63991441137718
k =
   287
ans =
  -0.18061291483819   0.14782608508021   0.63991441451057
k =
   288
ans =
  -0.18061291795779   0.14782608518224   0.63991441747356
k =
   289
ans =
  -0.18061292090773   0.14782608527873   0.63991442027541
k =
   290
ans =
  -0.18061292369725   0.14782608536998   0.63991442292489
for i=1:10, k=k+1,x=G*x+g;x.', end
k =
   291
ans =
  -0.18061292633508   0.14782608545626   0.63991442543029
k =
   292
ans =
  -0.18061292882945   0.14782608553784   0.63991442779944
k =
   293
ans =
  -0.18061293118817   0.14782608561499   0.63991443003975
k =
   294
ans =
  -0.18061293341862   0.14782608568795   0.63991443215822
k =
   295
ans =
  -0.18061293552777   0.14782608575694   0.63991443416149
k =
   296
ans =
  -0.18061293752222   0.14782608582217   0.63991443605582
k =
   297
ans =
  -0.18061293940821   0.14782608588386   0.63991443784712
k =
   298
ans =
  -0.18061294119163   0.14782608594220   0.63991443954102
k =
   299
ans =
  -0.18061294287807   0.14782608599736   0.63991444114279
k =
   300
ans =
  -0.18061294447279   0.14782608604952   0.63991444265746
for i=1:10, k=k+1,x=G*x+g;x.', end
k =
   301
ans =
  -0.18061294598079   0.14782608609884   0.63991444408976
k =
   302
ans =
  -0.18061294740678   0.14782608614549   0.63991444544416
k =
   303
ans =
  -0.18061294875523   0.14782608618959   0.63991444672491
k =
   304
ans =
  -0.18061295003034   0.14782608623130   0.63991444793601
k =
   305
ans =
  -0.18061295123611   0.14782608627074   0.63991444908124
k =
   306
ans =
  -0.18061295237630   0.14782608630803   0.63991445016420
k =
   307
ans =
  -0.18061295345449   0.14782608634330   0.63991445118826
k =
   308
ans =
  -0.18061295447405   0.14782608637665   0.63991445215663
k =
   309
ans =
  -0.18061295543816   0.14782608640818   0.63991445307234
k =
   310
ans =
  -0.18061295634984   0.14782608643800   0.63991445393825
for i=1:10, k=k+1,x=G*x+g;x.', end
k =
   311
ans =
  -0.18061295721194   0.14782608646620   0.63991445475707
k =
   312
ans =
  -0.18061295802715   0.14782608649287   0.63991445553137
k =
   313
ans =
  -0.18061295879804   0.14782608651808   0.63991445626355
k =
   314
ans =
  -0.18061295952700   0.14782608654192   0.63991445695592
k =
   315
ans =
  -0.18061296021632   0.14782608656447   0.63991445761063
k =
   316
ans =
  -0.18061296086815   0.14782608658579   0.63991445822974
k =
   317
ans =
  -0.18061296148453   0.14782608660595   0.63991445881518
k =
   318
ans =
  -0.18061296206740   0.14782608662502   0.63991445936878
k =
   319
ans =
  -0.18061296261856   0.14782608664305   0.63991445989228
k =
   320
ans =
  -0.18061296313975   0.14782608666009   0.63991446038730
for i=1:10, k=k+1,x=G*x+g;x.', end
k =
   321
ans =
  -0.18061296363260   0.14782608667621   0.63991446085541
k =
   322
ans =
  -0.18061296409865   0.14782608669146   0.63991446129806
k =
   323
ans =
  -0.18061296453935   0.14782608670587   0.63991446171664
k =
   324
ans =
  -0.18061296495609   0.14782608671950   0.63991446211245
k =
   325
ans =
  -0.18061296535016   0.14782608673239   0.63991446248674
k =
   326
ans =
  -0.18061296572280   0.14782608674458   0.63991446284068
k =
   327
ans =
  -0.18061296607518   0.14782608675611   0.63991446317536
k =
   328
ans =
  -0.18061296640839   0.14782608676701   0.63991446349185
k =
   329
ans =
  -0.18061296672348   0.14782608677731   0.63991446379112
k =
   330
ans =
  -0.18061296702144   0.14782608678706   0.63991446407412
for i=1:10, k=k+1,x=G*x+g;x.', end
k =
   331
ans =
  -0.18061296730319   0.14782608679627   0.63991446434173
k =
   332
ans =
  -0.18061296756962   0.14782608680499   0.63991446459479
k =
   333
ans =
  -0.18061296782157   0.14782608681323   0.63991446483408
k =
   334
ans =
  -0.18061296805981   0.14782608682102   0.63991446506036
k =
   335
ans =
  -0.18061296828509   0.14782608682839   0.63991446527434
k =
   336
ans =
  -0.18061296849813   0.14782608683536   0.63991446547668
k =
   337
ans =
  -0.18061296869957   0.14782608684195   0.63991446566801
k =
   338
ans =
  -0.18061296889007   0.14782608684818   0.63991446584894
k =
   339
ans =
  -0.18061296907020   0.14782608685407   0.63991446602003
k =
   340
ans =
  -0.18061296924054   0.14782608685964   0.63991446618182
for i=1:10, k=k+1,x=G*x+g;x.', end
k =
   341
ans =
  -0.18061296940161   0.14782608686491   0.63991446633481
k =
   342
ans =
  -0.18061296955393   0.14782608686989   0.63991446647947
k =
   343
ans =
  -0.18061296969796   0.14782608687460   0.63991446661627
k =
   344
ans =
  -0.18061296983416   0.14782608687906   0.63991446674564
k =
   345
ans =
  -0.18061296996295   0.14782608688327   0.63991446686796
k =
   346
ans =
  -0.18061297008474   0.14782608688725   0.63991446698364
k =
   347
ans =
  -0.18061297019990   0.14782608689102   0.63991446709302
k =
   348
ans =
  -0.18061297030880   0.14782608689458   0.63991446719645
k =
   349
ans =
  -0.18061297041178   0.14782608689795   0.63991446729426
k =
   350
ans =
  -0.18061297050916   0.14782608690114   0.63991446738675
for i=1:10, k=k+1,x=G*x+g;x.', end
k =
   351
ans =
  -0.18061297060124   0.14782608690415   0.63991446747421
k =
   352
ans =
  -0.18061297068832   0.14782608690700   0.63991446755692
k =
   353
ans =
  -0.18061297077066   0.14782608690969   0.63991446763513
k =
   354
ans =
  -0.18061297084852   0.14782608691224   0.63991446770908
k =
   355
ans =
  -0.18061297092215   0.14782608691465   0.63991446777901
k =
   356
ans =
  -0.18061297099178   0.14782608691692   0.63991446784514
k =
   357
ans =
  -0.18061297105761   0.14782608691908   0.63991446790767
k =
   358
ans =
  -0.18061297111987   0.14782608692111   0.63991446796680
k =
   359
ans =
  -0.18061297117874   0.14782608692304   0.63991446802272
k =
   360
ans =
  -0.18061297123441   0.14782608692486   0.63991446807560
for i=1:10, k=k+1,x=G*x+g;x.', end
k =
   361
ans =
  -0.18061297128706   0.14782608692658   0.63991446812560
k =
   362
ans =
  -0.18061297133684   0.14782608692821   0.63991446817288
k =
   363
ans =
  -0.18061297138391   0.14782608692975   0.63991446821759
k =
   364
ans =
  -0.18061297142842   0.14782608693121   0.63991446825986
k =
   365
ans =
  -0.18061297147051   0.14782608693258   0.63991446829984
k =
   366
ans =
  -0.18061297151032   0.14782608693388   0.63991446833765
k =
   367
ans =
  -0.18061297154795   0.14782608693511   0.63991446837340
k =
   368
ans =
  -0.18061297158355   0.14782608693628   0.63991446840720
k =
   369
ans =
  -0.18061297161720   0.14782608693738   0.63991446843917
k =
   370
ans =
  -0.18061297164903   0.14782608693842   0.63991446846940
for i=1:10, k=k+1,x=G*x+g;x.', end
k =
   371
ans =
  -0.18061297167912   0.14782608693941   0.63991446849798
k =
   372
ans =
  -0.18061297170758   0.14782608694034   0.63991446852501
k =
   373
ans =
  -0.18061297173449   0.14782608694122   0.63991446855057
k =
   374
ans =
  -0.18061297175994   0.14782608694205   0.63991446857474
k =
   375
ans =
  -0.18061297178400   0.14782608694284   0.63991446859760
k =
   376
ans =
  -0.18061297180676   0.14782608694358   0.63991446861921
k =
   377
ans =
  -0.18061297182827   0.14782608694428   0.63991446863964
k =
   378
ans =
  -0.18061297184862   0.14782608694495   0.63991446865897
k =
   379
ans =
  -0.18061297186786   0.14782608694558   0.63991446867725
k =
   380
ans =
  -0.18061297188606   0.14782608694617   0.63991446869453
for i=1:10, k=k+1,x=G*x+g;x.', end
k =
   381
ans =
  -0.18061297190326   0.14782608694674   0.63991446871087
k =
   382
ans =
  -0.18061297191953   0.14782608694727   0.63991446872632
k =
   383
ans =
  -0.18061297193491   0.14782608694777   0.63991446874093
k =
   384
ans =
  -0.18061297194946   0.14782608694825   0.63991446875475
k =
   385
ans =
  -0.18061297196322   0.14782608694870   0.63991446876782
k =
   386
ans =
  -0.18061297197623   0.14782608694912   0.63991446878017
k =
   387
ans =
  -0.18061297198853   0.14782608694953   0.63991446879185
k =
   388
ans =
  -0.18061297200016   0.14782608694991   0.63991446880290
k =
   389
ans =
  -0.18061297201116   0.14782608695027   0.63991446881335
k =
   390
ans =
  -0.18061297202156   0.14782608695061   0.63991446882323
for i=1:10, k=k+1,x=G*x+g;x.', end
k =
   391
ans =
  -0.18061297203140   0.14782608695093   0.63991446883257
k =
   392
ans =
  -0.18061297204070   0.14782608695123   0.63991446884140
k =
   393
ans =
  -0.18061297204949   0.14782608695152   0.63991446884976
k =
   394
ans =
  -0.18061297205781   0.14782608695179   0.63991446885766
k =
   395
ans =
  -0.18061297206567   0.14782608695205   0.63991446886513
k =
   396
ans =
  -0.18061297207311   0.14782608695229   0.63991446887219
k =
   397
ans =
  -0.18061297208014   0.14782608695252   0.63991446887887
k =
   398
ans =
  -0.18061297208679   0.14782608695274   0.63991446888519
k =
   399
ans =
  -0.18061297209308   0.14782608695295   0.63991446889116
k =
   400
ans =
  -0.18061297209903   0.14782608695314   0.63991446889681
for i=1:10, k=k+1,x=G*x+g;x.', end
k =
   401
ans =
  -0.18061297210465   0.14782608695332   0.63991446890215
k =
   402
ans =
  -0.18061297210997   0.14782608695350   0.63991446890720
k =
   403
ans =
  -0.18061297211500   0.14782608695366   0.63991446891197
k =
   404
ans =
  -0.18061297211975   0.14782608695382   0.63991446891649
k =
   405
ans =
  -0.18061297212425   0.14782608695396   0.63991446892076
k =
   406
ans =
  -0.18061297212850   0.14782608695410   0.63991446892480
k =
   407
ans =
  -0.18061297213252   0.14782608695424   0.63991446892862
k =
   408
ans =
  -0.18061297213632   0.14782608695436   0.63991446893223
k =
   409
ans =
  -0.18061297213991   0.14782608695448   0.63991446893564
k =
   410
ans =
  -0.18061297214331   0.14782608695459   0.63991446893887
for i=1:10, k=k+1,x=G*x+g;x.', end
k =
   411
ans =
  -0.18061297214653   0.14782608695469   0.63991446894192
k =
   412
ans =
  -0.18061297214957   0.14782608695479   0.63991446894481
k =
   413
ans =
  -0.18061297215244   0.14782608695489   0.63991446894754
k =
   414
ans =
  -0.18061297215516   0.14782608695498   0.63991446895012
k =
   415
ans =
  -0.18061297215773   0.14782608695506   0.63991446895256
k =
   416
ans =
  -0.18061297216016   0.14782608695514   0.63991446895487
k =
   417
ans =
  -0.18061297216246   0.14782608695521   0.63991446895705
k =
   418
ans =
  -0.18061297216463   0.14782608695529   0.63991446895912
k =
   419
ans =
  -0.18061297216669   0.14782608695535   0.63991446896107
k =
   420
ans =
  -0.18061297216863   0.14782608695542   0.63991446896292
for i=1:10, k=k+1,x=G*x+g;x.', end
k =
   421
ans =
  -0.18061297217047   0.14782608695548   0.63991446896466
k =
   422
ans =
  -0.18061297217221   0.14782608695553   0.63991446896631
k =
   423
ans =
  -0.18061297217385   0.14782608695559   0.63991446896787
k =
   424
ans =
  -0.18061297217540   0.14782608695564   0.63991446896935
k =
   425
ans =
  -0.18061297217687   0.14782608695569   0.63991446897074
k =
   426
ans =
  -0.18061297217826   0.14782608695573   0.63991446897206
k =
   427
ans =
  -0.18061297217958   0.14782608695577   0.63991446897331
k =
   428
ans =
  -0.18061297218082   0.14782608695582   0.63991446897449
k =
   429
ans =
  -0.18061297218199   0.14782608695585   0.63991446897561
k =
   430
ans =
  -0.18061297218311   0.14782608695589   0.63991446897666
for i=1:10, k=k+1,x=G*x+g;x.', end
k =
   431
ans =
  -0.18061297218416   0.14782608695592   0.63991446897766
k =
   432
ans =
  -0.18061297218515   0.14782608695596   0.63991446897860
k =
   433
ans =
  -0.18061297218609   0.14782608695599   0.63991446897950
k =
   434
ans =
  -0.18061297218698   0.14782608695602   0.63991446898034
k =
   435
ans =
  -0.18061297218782   0.14782608695604   0.63991446898114
k =
   436
ans =
  -0.18061297218861   0.14782608695607   0.63991446898189
k =
   437
ans =
  -0.18061297218936   0.14782608695609   0.63991446898261
k =
   438
ans =
  -0.18061297219007   0.14782608695612   0.63991446898328
k =
   439
ans =
  -0.18061297219075   0.14782608695614   0.63991446898392
k =
   440
ans =
  -0.18061297219138   0.14782608695616   0.63991446898452
for i=1:10, k=k+1,x=G*x+g;x.', end
k =
   441
ans =
  -0.18061297219198   0.14782608695618   0.63991446898509
k =
   442
ans =
  -0.18061297219255   0.14782608695620   0.63991446898563
k =
   443
ans =
  -0.18061297219309   0.14782608695622   0.63991446898614
k =
   444
ans =
  -0.18061297219359   0.14782608695623   0.63991446898662
k =
   445
ans =
  -0.18061297219407   0.14782608695625   0.63991446898708
k =
   446
ans =
  -0.18061297219453   0.14782608695626   0.63991446898751
k =
   447
ans =
  -0.18061297219496   0.14782608695628   0.63991446898792
k =
   448
ans =
  -0.18061297219536   0.14782608695629   0.63991446898831
k =
   449
ans =
  -0.18061297219575   0.14782608695630   0.63991446898867
k =
   450
ans =
  -0.18061297219611   0.14782608695632   0.63991446898902
for i=1:10, k=k+1,x=G*x+g;x.', end
k =
   451
ans =
  -0.18061297219645   0.14782608695633   0.63991446898934
k =
   452
ans =
  -0.18061297219678   0.14782608695634   0.63991446898965
k =
   453
ans =
  -0.18061297219709   0.14782608695635   0.63991446898994
k =
   454
ans =
  -0.18061297219738   0.14782608695636   0.63991446899022
k =
   455
ans =
  -0.18061297219765   0.14782608695637   0.63991446899048
k =
   456
ans =
  -0.18061297219791   0.14782608695637   0.63991446899072
k =
   457
ans =
  -0.18061297219816   0.14782608695638   0.63991446899096
k =
   458
ans =
  -0.18061297219839   0.14782608695639   0.63991446899118
k =
   459
ans =
  -0.18061297219861   0.14782608695640   0.63991446899139
k =
   460
ans =
  -0.18061297219881   0.14782608695640   0.63991446899158
for i=1:10, k=k+1,x=G*x+g;x.', end
k =
   461
ans =
  -0.18061297219901   0.14782608695641   0.63991446899177
k =
   462
ans =
  -0.18061297219920   0.14782608695642   0.63991446899195
k =
   463
ans =
  -0.18061297219937   0.14782608695642   0.63991446899211
k =
   464
ans =
  -0.18061297219954   0.14782608695643   0.63991446899227
k =
   465
ans =
  -0.18061297219970   0.14782608695643   0.63991446899242
k =
   466
ans =
  -0.18061297219984   0.14782608695644   0.63991446899256
k =
   467
ans =
  -0.18061297219998   0.14782608695644   0.63991446899269
k =
   468
ans =
  -0.18061297220012   0.14782608695645   0.63991446899282
k =
   469
ans =
  -0.18061297220024   0.14782608695645   0.63991446899294
k =
   470
ans =
  -0.18061297220036   0.14782608695645   0.63991446899305
for i=1:10, k=k+1,x=G*x+g;x.', end
k =
   471
ans =
  -0.18061297220047   0.14782608695646   0.63991446899316
k =
   472
ans =
  -0.18061297220058   0.14782608695646   0.63991446899326
k =
   473
ans =
  -0.18061297220068   0.14782608695646   0.63991446899335
k =
   474
ans =
  -0.18061297220077   0.14782608695647   0.63991446899344
k =
   475
ans =
  -0.18061297220086   0.14782608695647   0.63991446899353
k =
   476
ans =
  -0.18061297220095   0.14782608695647   0.63991446899361
k =
   477
ans =
  -0.18061297220103   0.14782608695648   0.63991446899369
k =
   478
ans =
  -0.18061297220111   0.14782608695648   0.63991446899376
k =
   479
ans =
  -0.18061297220118   0.14782608695648   0.63991446899383
k =
   480
ans =
  -0.18061297220125   0.14782608695648   0.63991446899389
for i=1:10, k=k+1,x=G*x+g;x.', end
k =
   481
ans =
  -0.18061297220131   0.14782608695649   0.63991446899395
k =
   482
ans =
  -0.18061297220137   0.14782608695649   0.63991446899401
k =
   483
ans =
  -0.18061297220143   0.14782608695649   0.63991446899406
k =
   484
ans =
  -0.18061297220148   0.14782608695649   0.63991446899412
k =
   485
ans =
  -0.18061297220153   0.14782608695649   0.63991446899416
k =
   486
ans =
  -0.18061297220158   0.14782608695649   0.63991446899421
k =
   487
ans =
  -0.18061297220163   0.14782608695650   0.63991446899425
k =
   488
ans =
  -0.18061297220167   0.14782608695650   0.63991446899430
k =
   489
ans =
  -0.18061297220171   0.14782608695650   0.63991446899433
k =
   490
ans =
  -0.18061297220175   0.14782608695650   0.63991446899437
for i=1:10, k=k+1,x=G*x+g;x.', end
k =
   491
ans =
  -0.18061297220179   0.14782608695650   0.63991446899441
k =
   492
ans =
  -0.18061297220182   0.14782608695650   0.63991446899444
k =
   493
ans =
  -0.18061297220185   0.14782608695650   0.63991446899447
k =
   494
ans =
  -0.18061297220189   0.14782608695650   0.63991446899450
k =
   495
ans =
  -0.18061297220191   0.14782608695651   0.63991446899453
k =
   496
ans =
  -0.18061297220194   0.14782608695651   0.63991446899455
k =
   497
ans =
  -0.18061297220197   0.14782608695651   0.63991446899458
k =
   498
ans =
  -0.18061297220199   0.14782608695651   0.63991446899460
k =
   499
ans =
  -0.18061297220202   0.14782608695651   0.63991446899462
k =
   500
ans =
  -0.18061297220204   0.14782608695651   0.63991446899465
for i=1:10, k=k+1,x=G*x+g;x.', end
k =
   501
ans =
  -0.18061297220206   0.14782608695651   0.63991446899467
k =
   502
ans =
  -0.18061297220208   0.14782608695651   0.63991446899468
k =
   503
ans =
  -0.18061297220210   0.14782608695651   0.63991446899470
k =
   504
ans =
  -0.18061297220212   0.14782608695651   0.63991446899472
k =
   505
ans =
  -0.18061297220213   0.14782608695651   0.63991446899474
k =
   506
ans =
  -0.18061297220215   0.14782608695651   0.63991446899475
k =
   507
ans =
  -0.18061297220216   0.14782608695651   0.63991446899476
k =
   508
ans =
  -0.18061297220218   0.14782608695651   0.63991446899478
k =
   509
ans =
  -0.18061297220219   0.14782608695651   0.63991446899479
k =
   510
ans =
  -0.18061297220220   0.14782608695651   0.63991446899480
for i=1:10, k=k+1,x=G*x+g;x.', end
k =
   511
ans =
  -0.18061297220222   0.14782608695651   0.63991446899481
k =
   512
ans =
  -0.18061297220223   0.14782608695652   0.63991446899482
k =
   513
ans =
  -0.18061297220224   0.14782608695652   0.63991446899483
k =
   514
ans =
  -0.18061297220225   0.14782608695652   0.63991446899484
k =
   515
ans =
  -0.18061297220226   0.14782608695652   0.63991446899485
k =
   516
ans =
  -0.18061297220227   0.14782608695652   0.63991446899486
k =
   517
ans =
  -0.18061297220228   0.14782608695652   0.63991446899487
k =
   518
ans =
  -0.18061297220228   0.14782608695652   0.63991446899488
k =
   519
ans =
  -0.18061297220229   0.14782608695652   0.63991446899489
k =
   520
ans =
  -0.18061297220230   0.14782608695652   0.63991446899489
for i=1:10, k=k+1,x=G*x+g;x.', end
k =
   521
ans =
  -0.18061297220231   0.14782608695652   0.63991446899490
k =
   522
ans =
  -0.18061297220231   0.14782608695652   0.63991446899490
k =
   523
ans =
  -0.18061297220232   0.14782608695652   0.63991446899491
k =
   524
ans =
  -0.18061297220232   0.14782608695652   0.63991446899492
k =
   525
ans =
  -0.18061297220233   0.14782608695652   0.63991446899492
k =
   526
ans =
  -0.18061297220233   0.14782608695652   0.63991446899493
k =
   527
ans =
  -0.18061297220234   0.14782608695652   0.63991446899493
k =
   528
ans =
  -0.18061297220234   0.14782608695652   0.63991446899494
k =
   529
ans =
  -0.18061297220235   0.14782608695652   0.63991446899494
k =
   530
ans =
  -0.18061297220235   0.14782608695652   0.63991446899494
for i=1:10, k=k+1,x=G*x+g;x.', end
k =
   531
ans =
  -0.18061297220236   0.14782608695652   0.63991446899495
k =
   532
ans =
  -0.18061297220236   0.14782608695652   0.63991446899495
k =
   533
ans =
  -0.18061297220236   0.14782608695652   0.63991446899495
k =
   534
ans =
  -0.18061297220237   0.14782608695652   0.63991446899496
k =
   535
ans =
  -0.18061297220237   0.14782608695652   0.63991446899496
k =
   536
ans =
  -0.18061297220237   0.14782608695652   0.63991446899496
k =
   537
ans =
  -0.18061297220238   0.14782608695652   0.63991446899497
k =
   538
ans =
  -0.18061297220238   0.14782608695652   0.63991446899497
k =
   539
ans =
  -0.18061297220238   0.14782608695652   0.63991446899497
k =
   540
ans =
  -0.18061297220238   0.14782608695652   0.63991446899497
for i=1:10, k=k+1,x=G*x+g;x.', end
k =
   541
ans =
  -0.18061297220239   0.14782608695652   0.63991446899497
k =
   542
ans =
  -0.18061297220239   0.14782608695652   0.63991446899498
k =
   543
ans =
  -0.18061297220239   0.14782608695652   0.63991446899498
k =
   544
ans =
  -0.18061297220239   0.14782608695652   0.63991446899498
k =
   545
ans =
  -0.18061297220239   0.14782608695652   0.63991446899498
k =
   546
ans =
  -0.18061297220240   0.14782608695652   0.63991446899498
k =
   547
ans =
  -0.18061297220240   0.14782608695652   0.63991446899499
k =
   548
ans =
  -0.18061297220240   0.14782608695652   0.63991446899499
k =
   549
ans =
  -0.18061297220240   0.14782608695652   0.63991446899499
k =
   550
ans =
  -0.18061297220240   0.14782608695652   0.63991446899499
for i=1:10, k=k+1,x=G*x+g;x.', end
k =
   551
ans =
  -0.18061297220240   0.14782608695652   0.63991446899499
k =
   552
ans =
  -0.18061297220240   0.14782608695652   0.63991446899499
k =
   553
ans =
  -0.18061297220240   0.14782608695652   0.63991446899499
k =
   554
ans =
  -0.18061297220241   0.14782608695652   0.63991446899499
k =
   555
ans =
  -0.18061297220241   0.14782608695652   0.63991446899499
k =
   556
ans =
  -0.18061297220241   0.14782608695652   0.63991446899500
k =
   557
ans =
  -0.18061297220241   0.14782608695652   0.63991446899500
k =
   558
ans =
  -0.18061297220241   0.14782608695652   0.63991446899500
k =
   559
ans =
  -0.18061297220241   0.14782608695652   0.63991446899500
k =
   560
ans =
  -0.18061297220241   0.14782608695652   0.63991446899500
for i=1:10, k=k+1,x=G*x+g;x.', end
k =
   561
ans =
  -0.18061297220241   0.14782608695652   0.63991446899500
k =
   562
ans =
  -0.18061297220241   0.14782608695652   0.63991446899500
k =
   563
ans =
  -0.18061297220241   0.14782608695652   0.63991446899500
k =
   564
ans =
  -0.18061297220241   0.14782608695652   0.63991446899500
k =
   565
ans =
  -0.18061297220241   0.14782608695652   0.63991446899500
k =
   566
ans =
  -0.18061297220241   0.14782608695652   0.63991446899500
k =
   567
ans =
  -0.18061297220242   0.14782608695652   0.63991446899500
k =
   568
ans =
  -0.18061297220242   0.14782608695652   0.63991446899500
k =
   569
ans =
  -0.18061297220242   0.14782608695652   0.63991446899500
k =
   570
ans =
  -0.18061297220242   0.14782608695652   0.63991446899500
for i=1:10, k=k+1,x=G*x+g;x.', end
k =
   571
ans =
  -0.18061297220242   0.14782608695652   0.63991446899500
k =
   572
ans =
  -0.18061297220242   0.14782608695652   0.63991446899501
k =
   573
ans =
  -0.18061297220242   0.14782608695652   0.63991446899501
k =
   574
ans =
  -0.18061297220242   0.14782608695652   0.63991446899501
k =
   575
ans =
  -0.18061297220242   0.14782608695652   0.63991446899501
k =
   576
ans =
  -0.18061297220242   0.14782608695652   0.63991446899501
k =
   577
ans =
  -0.18061297220242   0.14782608695652   0.63991446899501
k =
   578
ans =
  -0.18061297220242   0.14782608695652   0.63991446899501
k =
   579
ans =
  -0.18061297220242   0.14782608695652   0.63991446899501
k =
   580
ans =
  -0.18061297220242   0.14782608695652   0.63991446899501
for i=1:10, k=k+1,x=G*x+g;x.', end
k =
   581
ans =
  -0.18061297220242   0.14782608695652   0.63991446899501
k =
   582
ans =
  -0.18061297220242   0.14782608695652   0.63991446899501
k =
   583
ans =
  -0.18061297220242   0.14782608695652   0.63991446899501
k =
   584
ans =
  -0.18061297220242   0.14782608695652   0.63991446899501
k =
   585
ans =
  -0.18061297220242   0.14782608695652   0.63991446899501
k =
   586
ans =
  -0.18061297220242   0.14782608695652   0.63991446899501
k =
   587
ans =
  -0.18061297220242   0.14782608695652   0.63991446899501
k =
   588
ans =
  -0.18061297220242   0.14782608695652   0.63991446899501
k =
   589
ans =
  -0.18061297220242   0.14782608695652   0.63991446899501
k =
   590
ans =
  -0.18061297220242   0.14782608695652   0.63991446899501
for i=1:10, k=k+1,x=G*x+g;x.', end
k =
   591
ans =
  -0.18061297220242   0.14782608695652   0.63991446899501
k =
   592
ans =
  -0.18061297220242   0.14782608695652   0.63991446899501
k =
   593
ans =
  -0.18061297220242   0.14782608695652   0.63991446899501
k =
   594
ans =
  -0.18061297220242   0.14782608695652   0.63991446899501
k =
   595
ans =
  -0.18061297220242   0.14782608695652   0.63991446899501
k =
   596
ans =
  -0.18061297220242   0.14782608695652   0.63991446899501
k =
   597
ans =
  -0.18061297220242   0.14782608695652   0.63991446899501
k =
   598
ans =
  -0.18061297220242   0.14782608695652   0.63991446899501
k =
   599
ans =
  -0.18061297220242   0.14782608695652   0.63991446899501
k =
   600
ans =
  -0.18061297220242   0.14782608695652   0.63991446899501
% Reseni se stabilizovalo na vsech 16 platnych mist:
A1\b1
ans =
  -0.18061297220242
   0.14782608695652
   0.63991446899501
diary off
