Code covered by the BSD License  

Highlights from
LU factorization with complete pivoting.

3.0

3.0 | 1 rating Rate this file 12 Downloads (last 30 days) File Size: 3.88 KB File ID: #27249

LU factorization with complete pivoting.

by Nick Henderson

 

14 Apr 2010 (Updated 24 Apr 2010)

An implementation of algorithm 3.4.2 from Matrix Computations.

| Watch this File

File Information
Description

To compute the LU factorization under default settings:

  [L U p q] = lucp(A)

This produces a factorization such that L*U = A(p,q). Vectors p and q permute the rows and columns, respectively.

The pivot tolerance can be controlled:

  [L U p q] = lucp(A,tol)

The algorithm will terminate if the absolute value of the pivot is less than tol.

Permutation matrices can be generated:

  [L U P Q] = lucp(A,tol,'matrix')
  [L U P Q] = lucp(A,tol,'sparse')

The first will generate full permutation matrices P and Q such that L*U = P*A*Q. The second generates sparse P and Q.

If A is sparse, L and U will be sparse. However, no effort is taken to reduce fill in.

This function works on non-square matrices.

Acknowledgements

The author wishes to acknowledge the following in the creation of this submission:
Gauss elimination with complete pivoting, Gaussian Elimination using Complete Pivoting

MATLAB release MATLAB 7.8 (R2009a)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (1)
25 Apr 2011 cidem m  
Please login to add a comment or rating.
Updates
24 Apr 2010

Performs a final column swap in the case where A is m by n with n > m. The goal is to have well conditioned U(1:m,1:m).

24 Apr 2010

fixed bug from last update.

Tag Activity for this File
Tag Applied By Date/Time
linear algebra Nick Henderson 15 Apr 2010 12:04:53
lu Nick Henderson 15 Apr 2010 12:04:53
factorization Nick Henderson 15 Apr 2010 12:04:53
complete pivoting Nick Henderson 15 Apr 2010 12:04:53
gaussian elimination Nick Henderson 15 Apr 2010 12:04:53

Contact us at files@mathworks.com