Solving a set of simultaneous equations with matrices

1 回表示 (過去 30 日間)
JS
JS 2019 年 2 月 28 日
コメント済み: JS 2019 年 2 月 28 日
Hello, I am trying to solve a set of simultaneous equations as follows, where the values of Qa, Q1, Q2, Q3, Q4 are unknown, and g1, g2, g3, g4, and ga are each 41x1 matrices, the values of which are known. The values of Qa, Q1, Q2, Q3 and Q4 are to be 41x1 matrices that are non-negative. I have tried to solve the equations using vpasolve and fsolve, however it will not complete the calculation in either case. Is there a way of calculating the solutions to simultaneous equations which contain matrices, to calculate the values of Q which correspond to each value in the matrix? Thank you for your help!
syms Qa_1 Q1_1 Q2_1 Q3_1 Q4_1
eqn1_1 = (Qa_1 - (Q1_1 + Q2_1 + Q3_1 + Q4_1));
eqn2_1 = (Qa_1^2/60.51 + Q1_1^2/0.862 - (-2.375*g1_11 + 12.295*ga_11));
eqn3_1 = (Qa_1^2/60.51 + Q2_1^2/1.346 - (-2.375*Hv2 + 8.395*ga_11));
eqn4_1 = (Qa_1^2/60.51 + Q3_1^2/1.346 - (-2.375*Hv3 + 4.495*ga_11));
eqn5_1 = (Qa_1^2/60.51 + Q4_1^2/1.346 - (-2.265*g4_11 + 0.82*ga_11));
  2 件のコメント
Torsten
Torsten 2019 年 2 月 28 日
編集済み: Torsten 2019 年 2 月 28 日
And what is Hv2 and Hv3 ?
I assume you meant Hv2 = g2_11 and Hv3 = g3_11.
The solution to your problem is to call "fsolve" 41 times in a loop.
JS
JS 2019 年 2 月 28 日
Yes sorry, I meant to change that to g2_11 and g3_11. Thank you, I will give that a go.

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

回答 (0 件)

カテゴリ

Help Center および File ExchangeOrdinary Differential Equations についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by