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.
Ivo Houtzager (2021). Least squares with minimum-norm solution (https://www.mathworks.com/matlabcentral/fileexchange/17474-least-squares-with-minimum-norm-solution), MATLAB Central File Exchange. Retrieved .
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Create scripts with code, output, and formatted text in a single executable document.
Hi,
How we can use these files?
Thanks
well written .
ok. point taken
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)
why can't you use A\B