solve A*X=B containing very large or small elements
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
hosein Javan
el 9 de Ag. de 2020
Comentada: Bruno Luong
el 10 de Ag. de 2020
hello
i have this linear system of equations A*X=B, which is apparently ill-conditioned with RCOND = 0. the elements in these matrices are either extremely large or small which have been derived using "besseli" and "besselk" functions.
A=
2.7673e+84 -2.7673e+84 -9.1252e-88 0 0 0 0 0 0 0
1.1039e+87 -2.2078e+90 7.2433e-82 0 0 0 0 0 0 0
0 7.7866e+105 2.5944e-109 -7.7866e+105 -2.5944e-109 0 0 0 0 0
0 6.2089e+111 -2.0604e-103 -6.2089e+111 2.0604e-103 0 0 0 0 0
0 0 0 1.5218e+110 1.2764e-113 -1.5218e+110 -1.2764e-113 0 0 0
0 0 0 1.2134e+116 -1.0138e-107 -1.2134e+116 1.0138e-107 0 0 0
0 0 0 0 0 2.2359e+127 7.5295e-131 -2.2359e+127 -7.5295e-131 0
0 0 0 0 0 1.7822e+133 -5.9817e-125 -8.9112e+129 2.9909e-128 0
0 0 0 0 0 0 0 1.9154e+170 6.5919e-174 -6.5919e-174
0 0 0 0 0 0 0 7.6309e+172 -2.6195e-171 5.239e-168
B=
-5.3706e+78
-4.2847e+84
1.5112e+100
1.205e+106
0
0
0
0
0
0
the solution is returend using X=A\B :
X=
0
1.9407e-06
4.6374e+150
8.1617e-89
4.6374e+150
1.5549e-107
4.6374e+150
-3.1817e-193
9.2546e+150
9.2616e+147
but it has realy large error:
A*X-B=
-8.2275e+63
0
-1.9427e+84
0
1.8889e+22
0
0
-1.0771e+10
-2.25e-39
0
also I am uncertained that in the future I might need to calculate other matrices which could probably contain even larger or smaller values that leads to "inf" or "0" elements.
I know that using "digits" and "vpa" functions in symbolic math toolbox it is really accurate but SPEED plays an important role in my code.
I have searched about "Fixed-point Designer Tollbox" but I did not find an example like mine.
what is the best workaround in this condition?
0 comentarios
Respuesta aceptada
Más respuestas (0)
Ver también
Categorías
Más información sobre Linear Algebra en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!