本帖最后由 maple1314168 于 2019-5-27 20:05 編輯 |
Compare solutions to a system of linear equations obtained by backslash (\) and pinv.
If a rectangular coefficient matrix A is of low rank, then the least-squares problem of minimizing norm(A*x-b) has infinitely many solutions. Two solutions are returned by x1 = A\b and x2 = pinv(A)*b. The distinguishing properties of these solutions are that x1 has only rank(A) nonzero components, and norm(x2) is smaller than for any other solution.