Skip to content

LUdecomp #1

Description

@pauljsymonds

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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions