how to solve equation without values

6 visualizaciones (últimos 30 días)
Muhammad Kundi
Muhammad Kundi el 6 de Oct. de 2019
Comentada: Muhammad Kundi el 7 de Oct. de 2019
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

Respuesta aceptada

Walter Roberson
Walter Roberson el 6 de Oct. de 2019
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)

Más respuestas (1)

the cyclist
the cyclist el 6 de Oct. de 2019
Editada: the cyclist el 6 de Oct. de 2019
I suggest you read the documentation about simplifying symblic expressions for the Symbolic Math Toolbox.
  1 comentario
John D'Errico
John D'Errico el 6 de Oct. de 2019
And especially read about the subs utility.

Iniciar sesión para comentar.

Categorías

Más información sobre Polynomials en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by