MATLAB: Problem finding 2 unknown matrices in 2 equations

equationsmatricesmatrixsolveunknown

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

Best Answer

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.
Related Question