how to solve equation without values

조회 수: 12 (최근 30일)
Muhammad Kundi
Muhammad Kundi 2019년 10월 6일
댓글: Muhammad Kundi 2019년 10월 7일
hi,
I just want to solve the following equation. Just the simplified form without values.
I mean I just want to do the following task:
X1= 2- 4a
X2=3- 4a
I just want to use these values in the following expression
Capture.JPG
and get the simplified equation with only "a" as the variable

채택된 답변

Walter Roberson
Walter Roberson 2019년 10월 6일
syms X1 X2 a
expr = 4*X1^2 - 4*X1*X2 + 2*X2^2;
new_expr = subs(expr, {X1, X2}, {2-4*a, 3-4*a});
simplify(new_expr)
  댓글 수: 1
Muhammad Kundi
Muhammad Kundi 2019년 10월 7일
Thank you so much for your help

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

추가 답변 (1개)

the cyclist
the cyclist 2019년 10월 6일
편집: the cyclist 2019년 10월 6일
I suggest you read the documentation about simplifying symblic expressions for the Symbolic Math Toolbox.
  댓글 수: 1
John D'Errico
John D'Errico 2019년 10월 6일
And especially read about the subs utility.

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

카테고리

Help CenterFile Exchange에서 Equation Solving에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by