Solving Matrix Equations With Unknown at Both Sides

Hello,
How can I solve matrix equations in Matlab? Consider following case:
Thank you

回答 (3 件)

Matt J
Matt J 2023 年 6 月 26 日
編集済み: Matt J 2023 年 6 月 26 日

0 投票

Since these are linear equations, you would re-arrange in the form
Matrix*[T1;T3;F2] =[4; 0; 5]
and solve normally.
Matt J
Matt J 2023 年 6 月 26 日

0 投票

T1=optimvar('T1');
T2=optimvar('T2');
F2=optimvar('F2');
prob=eqnproblem;
prob.Equations.eqn=[1 -0.5 4;-0.5 2 0; 4 0 3]*[T1;0;T2]==[4;F2;5];
sol=solve(prob)
Solving problem using lsqlin.
sol = struct with fields:
F2: -0.3077 T1: 0.6154 T2: 0.8462
Torsten
Torsten 2023 年 6 月 26 日

0 投票

syms T1 T3 F2
eqns = [1 -0.5 4;-0.5 2 0; 4 0 3]*[T1;0;T3]==[4;F2;5];
solve(eqns)
ans = struct with fields:
F2: -4/13 T1: 8/13 T3: 11/13

カテゴリ

ヘルプ センター および File ExchangeMathematics についてさらに検索

製品

リリース

R2022b

質問済み:

2023 年 6 月 26 日

回答済み:

2023 年 6 月 26 日

Community Treasure Hunt

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

Start Hunting!

Translated by