-
Notifications
You must be signed in to change notification settings - Fork 7
LUdecomp #1
Copy link
Copy link
Open
Labels
good first issueGood for newcomersGood for newcomers
Description
Activity
Metadata
Metadata
Assignees
Labels
good first issueGood for newcomersGood for newcomers
can you take a look at the LUdecomp.py for the Doolittle algorithm.
If you take the matrix:
a = np.array([[2, -1, 0],
[-1, 2, -1],
[0, -1, 2]],float)
b = np.array([7,3,2], float)
x = array([7.2500, 7.5000, 4.7500])
Which you can get by simply running LUSolve(a,b)
When reading the book, it mentions that the following steps are required:
LUsolve(LUdecomp(a), b)
but this gives:
array([7.6667, 8.3333, 5.6667])
I think this example may be incorrect?
I have checked this with ColeskiSol
choleskiSol(choleski(A),b)
array([7.2500, 7.5000, 4.7500])
Is my assumption correct?