Something is wrong with my Matlab
Afficher commentaires plus anciens
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?
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Linear Algebra 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!