how to solve simultaneous equations?

252 ビュー (過去 30 日間)
bsd
bsd 2011 年 9 月 6 日
編集済み: KELVIN 2023 年 6 月 5 日
Dear sir/madam,
I need to solve two simultaneous linear equations. How could I do this in matlab? Looking forward to hearing from you soon.
Thanking you, BSD
  1 件のコメント
MUYIDEEN MOMOH
MUYIDEEN MOMOH 2019 年 3 月 24 日
Question
3x+2y=12
4x+6y=18
Matlab code
A=[3, 2 ; 4, 6];
B=[12; 18];
sol=linsolve(A,B)

サインインしてコメントする。

採用された回答

Paulo Silva
Paulo Silva 2011 年 9 月 6 日
Equations:
1x + 2y = 0
2x + 2y = 0
MATLAB code:
A = [1 2;2 2]
B = [0;0]
X = A\B
  1 件のコメント
KELVIN
KELVIN 2023 年 6 月 5 日
Mhhhh!

サインインしてコメントする。

その他の回答 (4 件)

Mu-izz Gbadamosi
Mu-izz Gbadamosi 2017 年 11 月 10 日
(x-(cos(alpha1)*(la*cos(theta1)+R)))^2 + (y-(-(R+la*cos(theta1))*sin(alpha1)))^2 + (z-(-la*sin(theta1)))^2 =lb^2;
(x-(cos(alpha2)*(la*cos(theta2)+R)))^2 + (y-(-(R+la*cos(theta2))*sin(alpha2)))^2 + (z-(-la*sin(theta2)))^2 =lb^2;
(x-(cos(alpha2)*(la*cos(theta3)+R)))^2 + (y-(-(R+la*cos(theta3))*sin(alpha2)))^2 + (z-(-la*sin(theta3)))^2=lb^2;

Ishika Shivahre
Ishika Shivahre 2021 年 3 月 10 日
x1+x2=1
0.718+y2 = 1
x1*P"= 0.718*86.8
x2*P2" = y2* 86.8

Yaavendra Ramsaroop
Yaavendra Ramsaroop 2021 年 5 月 4 日
A=[3, 2 ; 4, 6];
B=[12; 18];
sol=linsolve(A,B)

KELVIN
KELVIN 2023 年 6 月 5 日
編集済み: KELVIN 2023 年 6 月 5 日
Step 1: Express your equations into an Augmented Matrix where each equation represents a row of that matrix (excluding the answers/ the value beyond "=" sign.), assign the matrix to a variable. Let say A.
Step 2: Form a column matrix of the answers/ values beyond the "=" sign. Assign the column matrix to another variable B.
Step 3: Compute the solution by 'linsolve()' function OR sipmly A\B=inverse(A)*B
Solution=linsolve(A,B)

カテゴリ

Help Center および File ExchangeOperating on Diagonal Matrices についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by