Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Simultaneous equation

Status
Not open for further replies.

fanta2

Technical User
Apr 10, 2005
78
CA
I have pairs of simultaneous equation like:

line 1: x2 + x6 = 8.20
line 2: x5 + x2 = 15.18
line 3: x3 + x1 = 12.32
line 4: x2 + x3 = 5.08
line 5: x4 + x1 = 32.34

I am given a value of x1 = 4.6 and I am expected to get the value of other x's. Of course, it is simple, I will get the value of x3 using line 3, I will get the value of x4 using line 5. Then I will use the value of x3 and line 4 to get the value of x2 and so on.

I have a vector containing the x's and a vector containing the constant values. How can this be done in fast way in Fortran for larger number of equations? I appreciate any idea.

 
The array elements should be in a matrix, not a vector.
The constants (right-hand sides) can remain in a vector.
 
Thank you for your sugesstion. I have solved that problem using different approach ... from the functional relation of the matrix x - I am able to sequentially substitute the x's.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top