Hi there,
I am trying to perform simple iterations to solve a pair of simultaneous equations. However, I am not getting the correct results when using a for loop. My code looks like this:
eq1 = 2*x + y == 16
eq1 = 
eq2 = 5*y - x == 25
eq2 = 
Outside the loop the iterations are giving the correct answer. That is x2, x3, x4 = -2.50, -0.80, 0.250 respectively, and y2, y3, y4, 1.69, -0.50, -0.160 repectively.
But in the loop for x2, x3, x4 is 2.50, 1.250, -0.6250...
Am I doing something incorrect in my for loop to get these incorrect results?
Many thanks in adavance!