File Exchange

image thumbnail

Least squares with minimum-norm solution

version 1.6.0.3 (8.2 KB) by Ivo Houtzager
Least squares with minimum-norm solution

2 Downloads

Updated 07 Apr 2021

From GitHub

View Version History

View license on GitHub

Editor's Note: mex

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.

Cite As

Ivo Houtzager (2021). Least squares with minimum-norm solution (https://github.com/iwoodsawyer/lsmin/releases/tag/v1.6.0.3), GitHub. Retrieved .

Comments and Ratings (5)

control22

Hi,
How we can use these files?

Thanks

Siyi Deng

well written .

Jos x@y.z

ok. point taken

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)

Jos x@y.z

why can't you use A\B

MATLAB Release Compatibility
Created with R2012b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!