mldivide for underdetermined matrices
이전 댓글 표시
What does A\b (mldivide) do for underdetermined matrices? Clearly it's not the same thing as pinv(A)*b. The documentation avoids this topic. In a 2009 post it was stated that "MLDIVIDE will pick the solution with least number of non-zero elements." This cannot be the answer, as it is a NP-hard problem. Some heuristic must be used to indeed provide a solution with restricted support, but which heuristic is it?
답변 (1개)
Walter Roberson
2012년 6월 26일
If A is an m-by-n matrix with m ~= n and B is a column vector with m components, or a matrix with several such columns, then X = A\B is the solution in the least squares sense to the under- or overdetermined system of equations AX = B. In other words, X minimizes norm(A*X - B), the length of the vector AX - B. The rank k of A is determined from the QR decomposition with column pivoting. The computed solution X has at most k nonzero elements per column. If k < n, this is usually not the same solution as x = pinv(A)*B, which returns a least squares solution.
댓글 수: 2
Laurent Demanet
2012년 6월 27일
Lense
2014년 2월 28일
Apologies for this late answer, but maybe other might be helped by it.
Be careful of the different uses of 'least squares'. mldivide minimizes |Ax - b|||, no matter what the shape or rank of A is. However, in the case that A does not have rank equal to the length of x, the solution of the minimization problem is not unique, but we have a space of solutions. From this space, mldivide selects one that has a certain amount of zeros. What pinv does (disregarding the truncation of singular values) is select the solution in this space that has the minimum norm in x! So pinv minimizes |Ax-b||| with secondary minimization of |x|||.
카테고리
도움말 센터 및 File Exchange에서 Logical에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!