How to replace equations in symbolic function

2 views (last 30 days)
Good Morning,
Please I have a function F = 3*a*b
Therefore how can i change (a*b) with a variable 'x' to obtain F = 3*x
Think you.

Accepted Answer

Birdman
Birdman on 27 Mar 2020
By using subs function:
syms a b x
F=3*a*b;
Fnew=subs(F,{a,b},{x,1})
  9 Comments

Sign in to comment.

More Answers (0)

Products


Release

R2011a

Community Treasure Hunt

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

Start Hunting!