1.0

1.0 | 1 rating Rate this file 40 downloads (last 30 days) File Size: 1.99 KB File ID: #19197

Full Rank Factorization

by Calvin Price

 

13 Mar 2008 (Updated 03 Nov 2009)

Code covered by BSD License  

Performs a full rank factorization, X=KL

Download Now | 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)
Zip File Content  
Other Files frd.m,
license.txt
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (1)
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.

Please login to add a comment or rating.
Updates
31 Oct 2009

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

03 Nov 2009

Rounding issue is resolved.

Tag Activity for this File
Tag Applied By Date/Time
linear algebra Calvin Price 22 Oct 2008 09:53:24
full rank factorization Calvin Price 22 Oct 2008 09:53:24
full rank decomposition Calvin Price 22 Oct 2008 09:53:24
mathematics Calvin Price 22 Oct 2008 09:53:24
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com