<< linalg_rayleighiteration Linalg blaslapack >>

Linalg >> Linalg > linalg_solvelu

linalg_solvelu

Computes the solution of a linear equation, given its LU decomposition.

Calling Sequence

x = linalg_solvelu ( L , U , b , verbose )

Parameters

L :

a n-by-n matrix of doubles, lower triangular.

U :

a n-by-n matrix of doubles, upper triangular.

b :

a n-by-1 matrix of doubles

verbose :

a 1-by-1 matrix of boolean, set to true to display intermediate messages

x :

a n-by-1 matrix of doubles

Description

Solve Ax=b with A=L*U and L lower triangular and U upper triangular. Effective algorithm with vectorization.

Examples

L=[
1 0 0 0 0
1 1 0 0 0
1 1 1 0 0
1 1 1 1 0
1 1 1 1 1
];
U=[
1 1 1 1 1
0 1 1 1 1
0 0 1 1 1
0 0 0 1 1
0 0 0 0 1
];
b=[5;9;12;14;15];
xe=[1;1;1;1;1]
x=linalg_solvelu(L,U,b,%f)

Authors

<< linalg_rayleighiteration Linalg blaslapack >>