Commit 7d0717d6 authored by Aruchira's avatar Aruchira

Up

parent 658dc576
......@@ -12,3 +12,12 @@ def ge(A, b):
x[k] = (b[k] - np.dot(A[k,k+1:n], x[k+1:n]))/A[k,k]
print(x)
import numpy as np
A = np.array([
[4, -2, 1],
[-2, 4, -2],
[1, -2, 4]
], float)
b = np.array([11,-16,17], float)
ge(A, b)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment