how to solve equation without values
6 次查看(过去 30 天)
显示 更早的评论
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
and get the simplified equation with only "a" as the variable
0 个评论
采纳的回答
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 个)
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.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Polynomials 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!