Something is wrong with my Matlab
Mostrar comentarios más antiguos
Hi, today I saw a challenge on internet, so I decided to solve it using math and Matlab to check if I was right.
It was about a 3x3 system of equations.
The equation was:
A = [x x x; x y y; y -2z]
b = [60 30 3]'
And this is what I used.
A = [1 1 1; 1 1 1; 0 1 -2]
b = [60 30 3]'
When I found out the values of x, y and z, the values were: x = 20, y = 5 and z = 1.
But, on Matlab, they showed me the values for x = 16.28, y = 20 and z = 8.5.
I used the "A\b" command and after I used the "pinv(A)*b" command.
What I did wrong? Can you help me with that?
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Mathematics en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!