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 CenterFile Exchange에서 Ordinary Differential Equations에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by