If A is 4 banded 14 X 14 matrix and B= 14 X 1 matrix. Then how can i solve the system of equation for X where AX=B. A= 1 -2 1 8 -8 3 1 8 -8 3 1 8 -8 3 . .. ... ....... 1 8 -8 3 1 7 1
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Shivangi Chauhan
am 29 Feb. 2016
Kommentiert: Shivangi Chauhan
am 1 Mär. 2016
If A is 4 banded 14 X 14 matrix and B= 14 X 1 matrix. Then how can i solve the system of equation for X where AX=B. N=16
0 Kommentare
Akzeptierte Antwort
Mohammad Abouali
am 29 Feb. 2016
Bearbeitet: Mohammad Abouali
am 29 Feb. 2016
This is all needed
X=A\B
3 Kommentare
Stephen23
am 29 Feb. 2016
Bearbeitet: Stephen23
am 29 Feb. 2016
@Shivangi Chauhan: You are using the wrong method. While it is mathematically correct, the reality of floating point numbers means that calculating the inverse is a slow and inaccurate way to solve systems of equations. Mohammad Abouali gave you the correct method, this is what you should use.
And perhaps you might like to read the inv documentation, which gives exactly the same advice: "In practice, it is seldom necessary to form the explicit inverse of a matrix. A frequent misuse of inv arises when solving the system of linear equations Ax = b. One way to solve this is with x = inv(A)*b. A better way, from both an execution time and numerical accuracy standpoint, is to use the matrix division operator x = A\b. This produces the solution using Gaussian elimination, without forming the inverse. See mldivide (\) for further information."
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Linear Algebra finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!