5.0

5.0 | 1 rating Rate this file 4 Downloads (last 30 days) File Size: 7.48 KB File ID: #17474

Least squares with minimum-norm solution

by Ivo Houtzager

 

10 Nov 2007 (Updated 07 Oct 2010)

Least squares with minimum-norm solution

Editor's Notes:

mex

| Watch this File

File Information
Description

This function calculates the minimum-norm solution of the least squares problem A*X = B. Where A is low-rank matrix. The function LSMIN is faster then the matlab alternative X = pinv(A)*B. Uses the LAPACK functions (S,C,D,Z)EGLSS or (S,C,D,Z)EGLSD.

MATLAB release MATLAB 7.9 (R2009b)
Other requirements BLAS/LAPACK
Tags for This File  
Everyone's Tags
least, linear algebra, low, minimum, norm, rank, squares(2)
Tags I've Applied
Add New Tags Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (4)
12 Oct 2010 Siyi Deng

well written .

13 Nov 2007 Jos x@y.z

ok. point taken

13 Nov 2007 Ivo Houtzager

A\B does not work if A is low-rank

A=rand(4,2);
A=[A A]; % rank is 2
B=rand(4,1);
A\B
pinv(A)*B
lsmin(A,B)

12 Nov 2007 Jos x@y.z

why can't you use A\B

Updates
13 Nov 2007

Some bug fixes

12 May 2008

new mex-files for R2008a

06 Oct 2010

Updated for new Matlab 64 bit versions

07 Oct 2010

add documentation

Contact us