'Matrix dimensions must agree' error, when using the backslash operator to solve Ax = b,
이전 댓글 표시
Hi there!
I am getting a 'matrix dimensions must agree' error message when using the backslash operator \ to solve Ax = b. I went to check my matrix A and vector b, and see that A is 3x3 square, with full rank = 3. My vector b is 3x1, with rank = 1. Thus, the inner dimensions 'cancel', and the outputs are 3x1 vectors, as the vector x varies. So, my math doesn't seem to be wrong. So, out of curiosity, I go to the Command Window and just typed in A \ b, to see what the vector x looks like. As expected (I know that our equations of motion are going to be very, very long), I get back the vector x, but also this error message: 'Output truncated. Text exceeds maximum line length for Command Window display.'
Could it be that my 3x1 vector x has entries that are so 'long' that it disrupts the backslash operator \ ?
Or do you think my error is something else?
Thanks in advance,
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Logical에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!