Problem finding 2 unknown matrices in 2 equations
1 view (last 30 days)
Show older comments
Nicolai Hagelund
on 31 Oct 2013
Commented: Nicolai Hagelund
on 5 Nov 2013
Hello,
I have 2 equations containing 2 unknown matrices of size nxn that I need to find. The equations looks like this.
I+R=E*T
B1-B1*R=E*B2*T
Where I is the Identity matrix og size nxn, and B1, B2 and E are known matrices of size nxn.
It seems like the built in solve functions doesnt work with matrices, and I cant seem to figure out how to solve it. Can anyone help with this?
Edit: I forgot to mention that the matrices B1 and B2 are diagonal matrices.
- Nicolai Hagelund
2 Comments
Accepted Answer
Matt J
on 31 Oct 2013
Edited: Matt J
on 31 Oct 2013
If you multiply the first equation by B1 and add the equations, you will eliminate R
2*B1=(B1*E+E*B2)*T
You can then just solve for T linear algebraically (backslash) and then use equation (1) to obtain R.
3 Comments
Matt J
on 5 Nov 2013
Edited: Matt J
on 5 Nov 2013
Yes, you now have 2 equations
B1+B1*R=B1*E*T
B1-B1*R=E*B2*T
If you add them together, the +B1*R and -B1*R terms cancel with each other leading to the equation I showed you before
2*B1=(B1*E+E*B2)*T
Now, R has been eliminated and you just solve this for T.
See Also
Categories
Find more on Matrix Indexing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!