Solving multiple symbolic equations to get (X/Z)
4 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hello everyone, My system is described by the following equations: X = a Y + b Z; Y = c X + d Z;
I want to use Matlab to get (X/Z) as a function of a, b, c, d ??
0 commentaires
Réponse acceptée
Stephan
le 30 Juil 2018
Hi,
i guess you want this:
syms X Y Z a b c d
eqn(1) = X == a * Y + b * Z;
eqn(2) = Y == c * X + d * Z;
sol = solve(eqn,[X Z]);
x = sol.X
z = sol.Z
which is:
x =
(Y*b + Y*a*d)/(d + b*c)
z =
(Y - Y*a*c)/(d + b*c)
Best regards
Stephan
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Symbolic Math Toolbox dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!