Skip to content

Commit 7091226

Browse files
authored
Update Jacobi.py
1 parent e910b3f commit 7091226

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

LinearSystem/Jacobi.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ def jacobi(a,b,xInit = False, err = 1e-10, withMax = True):
4343
max = -1
4444
for i in range(len(xInit)):
4545
if abs(xInit[i] - prevX[i]) > max:
46-
limit = abs(xInit[i] - prevX[i])
46+
max = abs(xInit[i] - prevX[i])
47+
limit = max
4748

4849
else: # If use : sum (Xi - Yi)^2
4950
# limit = 0

0 commit comments

Comments
 (0)