Is this a linear equation in x and y?
NO. It is not. Perhaps you think you can transform it to a linear equation, simply by multiplying by y, to yield
NOT true. The two equations simply are not the same, because if y=0, that implies x=0 in the latter case, whereas (x,y) = (0,0) is NOT a valid solution to the original equation.
So MATLAB told you those equations are not in fact linear, which is the fact.
Now, suppose we decide that (1e5 + r1 + r2 + r3) will NEVER be zero.
syms r1 r2 r3
eq1=(r1+r2+r3) == (1e5+r1+r2+r3)*0.238;
eq2=(r2+r3) == (1e5+r1+r2+r3)*0.213;
eq3=(r3) == (1e5+r1+r2+r3)*0.125;
[A,b] = equationsToMatrix(eq1,eq2,eq3)
A =
[ 381/500, 381/500, 381/500]
[ -213/1000, 787/1000, 787/1000]
[ -1/8, -1/8, 7/8]
b =
23800
21300
12500
... which is not what you wrote. So you need to check your algebra. And you need to remember what they surely taught you some years ago in algebra 1 about the dangers of multiplying by zero.
Best Answer