How to solve linear equation with singular Matrix?
37 ビュー (過去 30 日間)
古いコメントを表示
I have a problem with the solution this linear equations AX=B, when A,X and B are matrices. The matrix A is singular matrix. Matrices A and B have just only 1 and 0.
0 件のコメント
回答 (3 件)
Ibrahim Albaik
2020 年 2 月 10 日
I have the same problem and still looking for solutions?
1 件のコメント
John D'Errico
2020 年 11 月 11 日
Please don't use an answer just for a me too response. Learn about comments.
John D'Errico
2020 年 11 月 11 日
A difficult question to answer, because there is no unique solution, and very likely, there is no exact solution. Really, it comes down to linear algebra 101. And possibly, you are trying to solve the problem in GF(2), thus the field of integers modulo 2. That would further complicate the problem.
What does it mean to try to solve the linear system A*x = b, for a square matrix A? Essentially, when you multiply a matrix A by any vector, you form a linear combination of the columns of the matix A. That is, A*x combines the columns in a way defined by the vector x. But when the matrix is singular, it is true that some of the columns of the matrix can be written as themselves a linear combination of the other columns. So there is no unique solution, even if a solution exists. And the odds are good that no exact solution will exist.
The standard example, (assuming you are not trying to work in GF(2)) is to use a pseudo-inverse. That is found in pinv, where the solution will be
x = pinv(A)*b;
Or, you could use lsqminnorm, but only in newer releases of MATLAB. (introduced in R2017b.) It will do as well.
Note that the pinv based solution will produce, since there are infinitely many solutions, the one where the vector x has minimum norm. (Note the name lsqminnorm.)
None of the above applies in the case of a GF(2) problem of course, but then you really should be careful in how you work with such a matrix, because you cannot use the traditional linear algebra tools in MATLAB.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Linear Algebra についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!