solve system of equations without using matrices.

Hi, Is it possible to solve a system of equations without using matrices? That is, Can I write a series of unordered linear equations and find the solution?

5 commentaires

Luca
Luca le 15 Jan 2018
Modifié(e) : Luca le 15 Jan 2018
syms x y z
eqn1 = 2*x^2 + y + z == 2;
eqn2 = -x + y - z +1== 3;
eqn3 = 2*y + 3*z == -10;
sol = solve([eqn1, eqn2, eqn3], [x, y, z]);
sol.x
sol.y
sol.z
that's ok,but isn't...
syms x y z
eqn1 = 2*x^2 + y + z == 2a;
eqn2 = -x + y - z +b == 3;
eqn3 = 2*y +c + 3*z == -10;
sol = solve([eqn1, eqn2, eqn3], [x, y, z]);
sol.x
sol.y
sol.z
why? Could you help me please? how do you proceed in these cases?
Ok I'm two years late but I think that its suppesed to be 2*a instead of 2a.
Luca
Luca le 11 Avr 2020
2*a ok, but doesn't work
What if you declare a, b, and c as symbolic also?
syms x y z a b c
eqn1 = 2*x^2 + y + z == 2*a;
eqn2 = -x + y - z +b == 3;
eqn3 = 2*y +c + 3*z == -10;
sol = solve([eqn1, eqn2, eqn3], [x, y, z]);
Luca
Luca le 12 Avr 2020
Yep

Connectez-vous pour commenter.

Réponses (0)

Question posée :

le 11 Jan 2018

Commenté :

le 12 Avr 2020

Community Treasure Hunt

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

Start Hunting!

Translated by