Effacer les filtres
Effacer les filtres

simultaneous equations in a loop

1 vue (au cours des 30 derniers jours)
Matthew Yih
Matthew Yih le 20 Juin 2015
Modifié(e) : Matthew Yih le 20 Juin 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!

Réponses (1)

Walter Roberson
Walter Roberson le 20 Juin 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 commentaire
Matthew Yih
Matthew Yih le 20 Juin 2015
sorry, forgot to mention v3=v4(op virtual ground)

Connectez-vous pour commenter.

Catégories

En savoir plus sur Programming dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by