Matrix division to solve Ax=b

EDU>> a=[1 22 484 10648; 1 42 1764 74088; 1 52 2704 140608; 1 82 6724 551368]; EDU>> b=[4181;4179;4186;4189]; EDU>> x=a/b ??? Error using ==> mrdivide Matrix dimensions must agree.
EDU>> x=a./b ??? Error using ==> rdivide Matrix dimensions must agree.
EDU>> The preceding is what I have been trying to solve for sometime now. I know the dementions are different, however; what I don't know is "what to do to solve the problem. I am using r2011a, if that matters. The program it to solve a third order polynomial.
Thank You

Respuestas (1)

Honglei Chen
Honglei Chen el 7 de Mzo. de 2012

0 votos

Use
x = a\b
see the documentation
doc mldivide
doc mrdivide

1 comentario

John
John el 7 de Mzo. de 2012
Thank You for the quick responce.
I looked at the doc mldivide and it diplayed a 3 by 3 matric and a 1 by three. It was able to perform the action that I am trying to do with a 4 by 4 and 1 by 4. I am starting to wonder if it has something to do with the version of matlab I am using.
Once again
Thank You

Iniciar sesión para comentar.

Preguntada:

el 7 de Mzo. de 2012

Community Treasure Hunt

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

Start Hunting!

Translated by