lusolve(G)

NAME
lusolve - sparse linear system solver

CALLING SEQUENCE
lusolve(hand,b)
lusolve(A,b)

PARAMETERS

b   : full real matrix

A   : real square sparse invertible matrix

hand
    : handle to a previously computed sparse lu factors (output of lufact)

DESCRIPTION
solves the sparse linear system  A*x = b.

[hand,rk]=lufact(A) is the output of lufact.

EXAMPLE
non_zeros=[1,2,3,4];rows_cols=[1,1;2,2;3,3;4,4];
sp=sparse(rows_cols,non_zeros);
[h,rk]=lufact(sp);x=lusolve(h,[1;1;1;1]);ludel(h)
rk,sp*x
non_zeros=[1,2,3,4];rows_cols=[1,1;2,2;3,3;4,4];
sp=sparse(rows_cols,non_zeros);
x=lusolve(sp,-ones(4,1));
sp*x

SEE ALSO
sparse, lufact, slash, backslash.