Arrange linear equation w.r.t variables

조회 수: 3 (최근 30일)
SMK
SMK 2013년 1월 28일
Hello,
How I can arrange the following linear equations such that it results same equations but with sequence of a,b,c and d?
R =
[0.8978*c - 0.8047*b - 0.020299*a, 0.8978*d - 0.094800*b - 0.106799*a]
[ 0.091199*a + 0.13200*c - 0.8047*d, 0.091199*b - 0.106799*c + 0.0575*d]
Thanks.
  댓글 수: 2
Azzi Abdelmalek
Azzi Abdelmalek 2013년 1월 28일
What does that mean?
SMK
SMK 2013년 1월 29일
It means that how I can arrange any result w.r.t its variables, so that I can get coefficient matrix in sequence of variables. Might be this time I could explain it.

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

답변 (1개)

Thorsten
Thorsten 2013년 1월 28일
The columns are a, b, c, d and the values in row 1, 2, 3 are the coefficients in your equation 1, 2, 3. Use zero if there is no coefficient, such as for d in your first equation
>> R = [-0.020299 -0.8047 0.8978 0 ; -0.106799 -0.094800 0 0.8978; 0.091199 0 0.13200 -0.8047; 0 0.091199 -0.106799 0.0575]
R =
-0.0203 -0.8047 0.8978 0
-0.1068 -0.0948 0 0.8978
0.0912 0 0.1320 -0.8047
0 0.0912 -0.1068 0.0575
You can then compute a solution to R*[a;b;c;d] = [1;5;30;4] (for example) by
R\[1;5;30;4];
  댓글 수: 2
SMK
SMK 2013년 1월 29일
Thanks, but how we reached on this arranged coefficient matrix?
Thorsten
Thorsten 2013년 1월 29일
Convert each equation of the sort c1*a + c2*b + c3*c + c4*d to a row of your matrix
c1 c2 c3 c4
So for example 0.8978*c - 0.8047*b - 0.020299*a gives values c4 = 0 (because there is no d), c3 = 0.8978 (the coefficient in front of c), c2 = -0.8047 (the coefficient in front of b) and finally c1 = -0.02099 (the coefficient in front of a):
-0.0203 -0.8047 0.8978 0
Same for the other terms you have.

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

카테고리

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

제품

Community Treasure Hunt

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

Start Hunting!

Translated by