Matrix from measured data is singular, what could be the reason?
2 次查看(过去 30 天)
显示 更早的评论
Unfortunatelly I don't get a solution for the LSE function:
C=(A'*A)\(A'*B)
with A=[i x 5], B=[i x1]
The matrix A'*A is singular. The matrixes A and B contain functions with measured data. The measured data has been cleaned and filtered before beeing utilized.
Does anybody know, what could be the reason? Maybe because oversampling?
rank(A'*A)=4
A'*A = 5×5
8.5012e+04 -4.9210e+03 1.4934e+01 -1.1823e+03 2.3363e+01
-4.9210e+03 7.2070e+02 -1.3927e+00 1.1026e+02 -1.0357e+00
1.4934e+01 -1.3927e+00 1.3082e-02 -1.0357e+00 5.2241e-01
-1.1823e+03 1.1026e+02 -1.0357e+00 8.2000e+01 -4.1359e+01
2.3363e+01 -1.0357e+00 5.2241e-01 -4.1359e+01 4.1082e+01
4 个评论
回答(3 个)
Bruno Luong
2022-4-28
17 个评论
Torsten
2022-4-28
Yes, we don't doubt that the source is trustworthy because we doubt that it's a misspelling.
Walter Roberson
2022-4-28
syms dj1 dj2 dji dU1 dU2 dUi j1 j2 ji k1 k2
A=[ dU1/dj1 k1/j1 k2 -1 j1
dU2/dj2 k1/j2 k2 -1 j2
dUi/dji k1/ji k2 -1 ji ]
t = A'*A
size(t)
rank(t)
A'*A is a linear combination of A with something (that happens to be A' ) . Linear combinations of a matrix cannot increase the rank, so A'*A cannot have higher rank than A has -- which is 3 because A has only 3 rows.
John D'Errico
2022-4-28
编辑:John D'Errico
2022-4-28
In no place in this thread have I seen the matrix A. I've seen various versions of it however, with various numbers of rows. I've seen you compute the product A'*A, and give the result of that. But I would strongly conjecture that A has only 4 rows and 5 columns, because in different places, you seem to show matrices with a different number of rows. And you don't seem to think the number of rows is pertinent.
In fact, the size of the matrix A itself is HUGELY pertinent. Why?
When you form the product of two matrices, the rank of the product can never be larger then the rank of either of the components in the product. It will be the same rank as the smaller of the two ranks. In your case, you tell us that A'*A has rank 4, and you show a matrix that is 5x5.
This tends to suggest that A itself has rank 4. And most likely, that suggests that A itself was only a 4x5 matrix, so it had only 4 rows. The rank of a 4x5 matrix will never be larger than 4. it could sometimes be less than 4. But NEVER larger. In that case, A'*A will ALWAYS be a singular matrix. It can never have a rank higher than 4.
I won't even get into the next question, to ask why in the name of god are you using the formula
X = (A'*A)\(A*B);
That just creates more numerical problems. The solution in MATLAB is:
X = A\B;
2 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Linear Least Squares 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!