Be the first to rate this file! 182 downloads (last 30 days) File Size: 7.12 KB File ID: #25453

Pseudo-inverse

by Bruno Luong

 

30 Sep 2009 (Updated 19 Oct 2009)

Code covered by BSD License  

Factorize a matrix for pseudo-inverse calculation purpose

Download Now | Watch this File

File Information
Description

Factorize a matrix for pseudo-inverse to solve the normal equation:

A*x = b

There are two advantages of pseudo-inverse compared to MATLAB pinv:
- PINV requires costly SVD
- PINV does not operated with sparse matrix.

The solution x minimize the 2-norm of the residual |Ax - b|.

In case of underdetermined system, i.e., rank(A) < length(x), the solution returned by pseudoinverse(A)*b is the least 2-norm among all solutions. Note that this property does *not* meet if backslash operator is used: x = A\b.

Method: Use QR factorization on both source and destination space. The factorized result is stored in object that can be used later to multiply with any target space vectors (RHS).

Inspired from FACTORIZE http://www.mathworks.com/matlabcentral/fileexchange/24119

Acknowledgements
This submission has inspired the following:
Free-knots spline approximation
MATLAB release MATLAB 7.9 (2009b)
Other requirements Full object oriented supported Matlab version
Zip File Content  
Other Files license.txt,
PseudoInverseFolder/@pseudoinverse/private/getoption.m,
PseudoInverseFolder/@pseudoinverse/private/lowercase.m,
PseudoInverseFolder/@pseudoinverse/pseudoinverse.m
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Please login to add a comment or rating.
Updates
05 Oct 2009

New description + Iterative method with Tkhonov regularization

09 Oct 2009

Change the code structure (private function instead of static methods) for better compatible with older Matlab versions

18 Oct 2009

New methods supported: left/right multiplication, conjugate, transpose, and complex-transpose

19 Oct 2009

Detect SuiteSparseQR package to carry out QR factorization on sparse matrix, not available for Matlab prior 2009B (?)

Tag Activity for this File
Tag Applied By Date/Time
moorepenrose Bruno Luong 30 Sep 2009 10:23:57
pseudoinverse Bruno Luong 30 Sep 2009 10:23:57
qr Bruno Luong 30 Sep 2009 10:23:57
minimum norm Bruno Luong 30 Sep 2009 10:23:57
regularization Bruno Luong 17 Oct 2009 02:47:12
leastsquares Bruno Luong 19 Oct 2009 09:32:02
tikhonov Bruno Luong 19 Oct 2009 17:23:13
 

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