how to subs more than one value in one equation

4 views (last 30 days)
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 Comments
darova
darova on 14 Oct 2019
Which variable should be replaced with zero here?
z = subs(x1,0);
ali almarzooqi
ali almarzooqi on 14 Oct 2019
I want to replace the two variable at the same time with zero

Sign in to comment.

Answers (1)

darova
darova on 14 Oct 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

Categories

Find more on Creating and Concatenating Matrices in Help Center and File Exchange

Products


Release

R2019a

Community Treasure Hunt

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

Start Hunting!