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.
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.