MATLAB: How to solve 4 linear equations with 4 unknowns

chemicalengineeringlinearmathematics

I got 4 linear equations with 4 unknown values to solve (R1,R2,R3,R4). I tried using matalb to get the answers and I'm having a difficult time. Can anyone help me solve this?
equ1='R1+R2 = 93.386 + (1.644*R3) – (9.9057*R4)'
equ2='R1+R2 = 73.02 + (2.263*R3) – (1.761*R4)'
equ3='R1+R2 = -141.48 + (12.62*R3) – (0.63*R4)'
equ4='R1+R2 = 31.725 + R3 + R4'
sol=solve(equ1,equ2,equ3,equ4)

Best Answer

A = [-1 -1 -1.644 8.938
-1 -1 -2.263 1.761
-1 -1 -12.62 0.63
-1 -1 -1 -1];
b = [93.386; 73.02; -141.48; 31.725];
A\b
However, it is obviously rank deficient. R1 and R2 are only ever used in the form R1+R2, so it is not possible to distinguish the two of them. You can rewrite all the R1+R2 as a temporary variable R1plusR2 and then the first three equations would be three equations in three variables, which would be enough to find all of the values, R1plusR2, R3, and R4. If you were then to substitute those results into the fourth equation, since it has no new forms of R1 or R2, then the left and right sides are completely determined, and the equation would either be false (inconsistent with the first 3) or true (consistent with the first 3) -- but if it were true then you still would not be able to figure out R1 separately from R2.