Solving a linear system equations with variables on both sides

조회 수: 10 (최근 30일)
Ali Baig
Ali Baig 2017년 11월 17일
댓글: Walter Roberson 2020년 11월 23일
I am trying to solve a linear system of equation in which variables occur on both sides.
Lu = [Lu1; Lu2; Lu3]
A = [1 2 3; 4 5 6; 7 8 9];
B = [U1; U2; U3];
In this system, I know Lu1, U2, and U3 and none of them is zero. Is there a way to solve this system of equations?

답변 (3개)

Walter Roberson
Walter Roberson 2017년 11월 17일
If the system is Lu'*A == B, then that is 9 equations in 3 unknowns. If you proceed to solve one variable at a time, then after you have solved for all three variables you reach the system
[ U2 == U2, U2 == U2, U2 == U2]
[ U2 == U2, U2 == U2, U2 == U2]
[ U2 == U3, U2 == U3, U2 == U3]
so the system can only be solved in the case that U2 == U3
  댓글 수: 2
joe kangas
joe kangas 2020년 11월 22일
this is a system with three unknowns and three equations, not 9. This problem comes up a lot in finite element solutions and as far as I'm aware there's not a straight forward general soltution. I believe they are itterative
Walter Roberson
Walter Roberson 2020년 11월 23일
If the system is Lu'*A == B' then
Lu = sym('Lu', [3 1], 'real');
A = [1 2 3; 4 5 6; 7 8 10]; %note original 7 8 9 is not full rank
B = sym('U', [3,1], 'real');
Lu'*A == B'
ans = 
So that is three equations in six unknowns.
%Lu' == B' * inv(A)
%Lu' == B'/A
%Lu = (B'/A)'
left_LU_solution = (B'/A)'
left_LU_solution = 
On the other hand if the equations were
A*Lu == B
ans = 
Then that would be a system of 9 equations in 6 unknowns:
right_Lu_solultion = A\B
right_Lu_solultion = 

댓글을 달려면 로그인하십시오.


Bruno Luong
Bruno Luong 2020년 11월 22일
See my answer in another thread.

Paul
Paul 2020년 11월 22일
Similar problem discussed here

카테고리

Help CenterFile Exchange에서 Stability Analysis에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by