Code covered by the BSD License  

Highlights from
Full Rank Factorization

3.0

3.0 | 2 ratings Rate this file 18 Downloads (last 30 days) File Size: 1.99 KB File ID: #19197

Full Rank Factorization

by

 

13 Mar 2008 (Updated )

Performs a full rank factorization, X=KL

| Watch this File

File Information
Description

FRD - Full rank factorization of input matrix X.

This will write X as the product of two matrices X = KL where both K and L have the same rank as X.

MATLAB release MATLAB 7.4 (R2007a)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (2)
19 Jan 2010 gemg  
08 Apr 2008 Tim Davis

This function simply calls the MATLAB rref.m function, and then "determines" the rank of the matrix by looking at the number of zeros on the diagonal of the reduced matrix; the corresponding rows are then removed. This method has several problems. First, rref.m is not one of the computational workhorses of MATLAB. It is quite slow for large matrices. The SVD is more accurate, and faster in this case becase the SVD is built-in but RREF is an M-file (and a slow one at that). RREF is in MATLAB not for production use, but more for educational purposes. Second, looking for exact zeros is not appropriate. You should at least ensure the matrix is well-scaled, and then look for small values, not zeros. Your method is prone to errors due to trivial round-off errors.

I timed the SVD and FRD on the matrix rand(1000), which is full rank. The SVD took 19 seconds, whereas FRD took 79 seconds. The former is vastly more accurate and robust than this code, and 4 times faster.

Updates
31 Oct 2009

The factorization is now based on the SVD of the input matrix.

03 Nov 2009

Rounding issue is resolved.

Contact us