Hello guys,
i have a A*x= B equation and filled my matrices with random numbers.
I used \ to get the results for x.
But when i use the calculated x to multiplicate with A, the result should be the matrix of B. In B and C are different matrices, which i dont understand.
Do i have any mistakes here?
A=rand(183,4);
B=rand(183,1);
x=A\B;
C=A*x;

 채택된 답변

Walter Roberson
Walter Roberson 2019년 10월 29일

0 개 추천

Your system is over-determined. mldivide is going to do a least-squared fitting. The reconstruction should not be expected to be the same as the original data (not unless the original data can be explained in 4 or fewer linear terms.)

댓글 수: 2

Aj
Aj 2019년 10월 29일
Thanks for the answer!
How can i fix this? Is there an alternative to mldivide?
Walter Roberson
Walter Roberson 2019년 10월 29일
You cannot fix this. You are asking to explain 183 or more independent values with only 4 coefficients.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Linear Algebra에 대해 자세히 알아보기

질문:

Aj
2019년 10월 29일

댓글:

2019년 10월 29일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by