how to solve equation without values

11 ビュー (過去 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 Center および File ExchangeEquation Solving についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by