how to subs more than one value in one equation

4 Ansichten (letzte 30 Tage)
ali almarzooqi
ali almarzooqi am 14 Okt. 2019
Beantwortet: darova am 14 Okt. 2019
I want to replace more than one variable in one equation
syms x1 x2 x3;
x1 = (-50+x2+12*x3)/3;
x2 = 6*x1-x3-3;
x3 = 40-6*x1-9*x2;
z = subs(x1,0);
x1 = subs(z,0)
i want to do the last to steps in one step
  2 Kommentare
darova
darova am 14 Okt. 2019
Which variable should be replaced with zero here?
z = subs(x1,0);
ali almarzooqi
ali almarzooqi am 14 Okt. 2019
I want to replace the two variable at the same time with zero

Melden Sie sich an, um zu kommentieren.

Antworten (1)

darova
darova am 14 Okt. 2019
Place variables in square brackets
syms x y z
eqn = x + 2*y + z;
eqn1 = subs(eqn,[x z],[0 0]) % new equation with replaced variables

Kategorien

Mehr zu Creating and Concatenating Matrices finden Sie in Help Center und File Exchange

Produkte


Version

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by