Retrieve lu factors at the scilab level (original) (raw)

Scilab 5.3.3

Please note that the recommended version of Scilab is 2026.0.1. This page might be outdated.
See the recommended documentation of this function

Scilab help >> UMFPACK Interface (sparse) > umf_luget

umf_luget

retrieve lu factors at the scilab level

Calling Sequence

[L,U,p,q,Rd] = umf_luget(LU_ptr)

Arguments

LU_ptr

a pointer to umf lu factors (L,U,p,q,R)

L,U

scilab sparse matrix

p,q

column vectors storing the permutations

Rd

vector storing the (row) scaling factors

Description

This function may be used if you want to plot the sparse pattern of the lu factors (or if you code something which use the lu factors). The factorization provided by umfpack is of the form:

P R^(-1) A Q = LU

where P and Q are permutation matrices, R is a diagonal matrix (row scaling), L a lower triangular matrix with a diagonal of 1, and U an upper triangular matrix. The function provides the matrices L and U as Sparse scilab matrices but P and Q are given as permutation vectors p and q (in fact p is the permutation associated to P') and Rd is the vector corresponding to the diagonal of R.

Examples

A = sparse( [ 2 3 0 0 0; 3 0 4 0 6; 0 -1 -3 2 0; 0 0 1 0 0; 0 4 2 0 1] ); Lup = umf_lufact(A); [L,U,p,q,R] = umf_luget(Lup); B = A; for i=1:5, B(i,:) = B(i,:)/R(i); end B(p,q) - L*U

umf_ludel(Lup)

A = sparse( [ 2+%i 3+2*%i 0 0 0; 3-%i 0 4+%i 0 6-3*%i; 0 -1+%i -3+6*%i 2-%i 0; 0 0 1-5*%i 0 0; 0 4 2-%i 0 1] ); Lup = umf_lufact(A); [L,U,p,q,R] = umf_luget(Lup); B = A; for i=1:5, B(i,:) = B(i,:)/R(i); end B(p,q) - L*U

umf_ludel(Lup)

See Also

Authors