How to solve Simultaneous equations

Risposte (2)

Torsten
Torsten il 25 Giu 2024
Spostato: Torsten il 25 Giu 2024
Write your equations as
A*z = b
for a 2x2-matrix A and a 2x1-vector b with z being the vector of unknowns [x;y].
To solve for z, you can then use "mldivide":
sympref('FloatingPointOutput',0);
syms x y
eqn1 = 4*x - 3*y == 0
eqn1 = 
eqn2 = 3*x + 2*y == 4
eqn2 = 
sol = solve([eqn1, eqn2])
sol = struct with fields:
x: 12/17 y: 16/17

Categorie

Scopri di più su Mathematics in Centro assistenza e File Exchange

Prodotti

Release

R2020a

Tag

Richiesto:

il 25 Giu 2024

Risposto:

il 25 Giu 2024

Community Treasure Hunt

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

Start Hunting!

Translated by