Filter löschen
Filter löschen

Solving a system of linear equations with a changing variable

2 Ansichten (letzte 30 Tage)
letoppina
letoppina am 20 Mär. 2021
Kommentiert: Walter Roberson am 20 Mär. 2021
Hello, I have the folliwing system of linear equations:
syms Qc Qh Qm1 Qm2 Qm3 T1 T2 T3
eqn1 = Qm1 - Qc == q0 - Pc - qw/2 ;
eqn2 = T1 + Rc*Qc == T0;
eqn3 = T2 - T1 + R1/2*Qm1 == R1/2*q0;
eqn4 = T2 - Rg0/2*Qm1 + Rg0/2*Qm2 == T0;
eqn5 = T3 - T2 + R1/2*Qm2 == R1/2*q0;
eqn6 = T3 - Rg0/2*Qm2 + Rg0/2*Qm3 == T0;
eqn7 = Qh + Qm3 == Ph - q0 + qw/2;
eqn8 = T3 - Rh*Qh == T0;
[A,B] = equationsToMatrix([eqn1, eqn2, eqn3, eqn4, eqn5, eqn6, eqn7, eqn8], [Qc Qh Qm1 Qm2 Qm3 T1 T2 T3]);
X = linsolve(A,B);
I would like to solve it with one or more changing given variables (for isntance, for different values of q0)? Is there a way to do so? Thanks in advance!
  1 Kommentar
Walter Roberson
Walter Roberson am 20 Mär. 2021
https://www.mathworks.com/matlabcentral/answers/776462-tranform-a-systems-of-equations-to-for-loop#comment_1405557

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Symbolic Math Toolbox finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by