Filter löschen
Filter löschen

simultaneous equations in a loop

1 Ansicht (letzte 30 Tage)
Matthew Yih
Matthew Yih am 20 Jun. 2015
Bearbeitet: Matthew Yih am 20 Jun. 2015
I realized it's a simple one....I am a beginner.
I want to use a for loop in which contain a quadruple simultaneous equation like this
r1,r2,r3,r4,r5,r6,r7 are given
v1,v2,v3,v5 are unknown
for rt= -100:400
(-5-v1)/r1+(v3-v1)/r4+(v2-v1)/rt=0
(v1-v2)/rt+(v3-v2)/r5+(5-v2)/r6=0
(5-v3)/r2+(v1-v3)/r4+(v5-v3)/r3=0
(0-v3)/r7+(v2-v3)/r5=0
end
And I want to plot v5/rt continuously
Anyone willing to help? Thanks!

Antworten (1)

Walter Roberson
Walter Roberson am 20 Jun. 2015
No, you have 4 equations in 5 unknowns, v1, v2, v3, v4, v5. You can solve the 4 equations for any 3 of (v1, v2, v3, v4) together with v5, but you will find that v5 is expressed in terms of the one of the four variables you did not solve for.
You would need one more equation in order to be able to solve the system
  1 Kommentar
Matthew Yih
Matthew Yih am 20 Jun. 2015
sorry, forgot to mention v3=v4(op virtual ground)

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Programming 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