using mldivide with matrix
1 回表示 (過去 30 日間)
古いコメントを表示
I have a set of three equations;
M1(i,j) = S1(i,j)*G(i,j)+ A(i,j) + B(i,j)
M2(i,j) = S2(i,j)*G(i,j)+ A(i,j) + B(i,j)
M3(i,j) = S3(i,j)*G(i,j)+ A(i,j) + B(i,j)
The solution should be three matrix :G, A and B Can I solve this using mldivide?
Thanks Avner mediouni R&D Physicist
回答 (2 件)
Walter Roberson
2017 年 1 月 10 日
If both A and B are unknown then you cannot solve that: you could possibly solve for A+B but you cannot separate the two.
0 件のコメント
John D'Errico
2017 年 1 月 10 日
No. Absolutely you cannot solve this problem. Well, you could solve it. But the answer would be completely meaningless. Why do I say this?
There is insufficient information content in the system of equations you pose. For ANY (i,j) you have 3 equations, in 3 unknowns. We can view this as:
M1 = S1*g + a + b
M2 = S2*g + a + b
M3 = S3*g + a + b
That system would apply for each pair of indices (i,j). If we can solve it for this case above, then we could solve it for your problem.
So, for ANY given set of 3 values for M1,M2,M3 and S1,S2,S3, how would we go about solving this problem? Can we solve it uniquely? NO. In fact, most of the time, there will be no solution at all. If there is a solution, then it will never be unique.
So, lets first examine the case where an exact solution does exist. So we have found a set of values g,a,b that satisfy these equations for your supplied values of M and S.
M1 = S1*g + a + b
M2 = S2*g + a + b
M3 = S3*g + a + b
Then we could arbitrarily add any constant to a, subtracting it from bn and have an equally valid solution. I.e., this is equally as valid a solution:
M1 = S1*g + (a+k) + (b-k)
M2 = S2*g + (a+k) + (b-k)
M3 = S3*g + (a+k) + (b-k)
true for any value of k.
The problem, in terms of linear algebra, is that your matrix problem will generally have rank 2. Most of the time though, on a rank deficient linear problem like this, there is no set of values (g,a,b) that will solve the above linear system at all.
So again, no, you cannot solve the problem uniquely. You can arbitrarily set one of the parameters, (a or b) to zero. Then you have an over determined problem, so 3 equations in 2 unknowns. This becomes a linear regression, unless the three points fall in a straight line, then no exact solution exists.
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!