Solving multiple symbolic equations to get (X/Z)

조회 수: 4 (최근 30일)
Nour Eldeen
Nour Eldeen 2018년 7월 30일
댓글: Nour Eldeen 2018년 7월 30일
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 ??

채택된 답변

Stephan
Stephan 2018년 7월 30일
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
  댓글 수: 1
Nour Eldeen
Nour Eldeen 2018년 7월 30일
Many thanks Stephan .. that's exactly what I wanted

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by