Clear Filters
Clear Filters

simultaneous equations in a loop

3 views (last 30 days)
Matthew Yih
Matthew Yih on 20 Jun 2015
Edited: Matthew Yih on 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!

Answers (1)

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

Sign in to comment.

Categories

Find more on Programming in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!