'Matrix dimensions must agree' error, when using the backslash operator to solve Ax = b,
Afficher commentaires plus anciens
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,
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Logical dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!