Solving Matrix Equations Using \
10 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Hi, I have a question which involves using the \ on matrix equations where AX=B.
The matrices that I have are:
A= 0.1750 0.0372 0.0160 0.0200 0.0590
0.0080 0.0035 0.0200 0.0600 0.0104
0.1220 0.0623 0.2670 0.8500 0.4721
0.6950 0.8970 0.6920 0.0670 0.3287
X=[5;2;4;1.5;0.5]
B=[x1;x2;x3;x4]
Here, if I compute AX=B,
B=[1.0729;0.2222;3.3137;8.3019]
However, say I am given only A and B, and want to calculate X. I used X=A\B but X does not equal what I had before. How can I make X=[5;2;4;1.5;0.5] again? What would I have to do?
Thanks
0 Commenti
Risposte (2)
Walter Roberson
il 27 Mag 2015
You have 4 equations in 5 unknowns. There is no solution that can recover the original coefficients. Your equations only define a vector in 5-space, not a point in 5-space.
0 Commenti
Thorsten
il 27 Mag 2015
Because A has fewer rows than columns, the equation is underdetermined, that means that there is no unique solution, but multiple valid ones.
Try
X2 = A\B;
A*X2 - A*X
ans =
1.0e-14 *
-0.1110
0
-0.1332
0
So the difference between both solutions is very low, in the range of e-14.
0 Commenti
Vedere anche
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!