Is there a function in matlab where I can get the common factor I want in an equation?

1 view (last 30 days)
ax+3by+4cy+x-1=0
Is there a function in matlab where I can get the common factor I want in this equation?
For example, I want the x and y factors. Is there a common factoring function like the one below?
x(a+1)+y(3b+4c)-1=0

Accepted Answer

Walter Roberson
Walter Roberson on 15 Aug 2021
syms a b c x y
eqn = a*x+3*b*y+4*c*y+x-1 == 0
eqn = 
collect(eqn, [x, y])
ans = 

More Answers (0)

Community Treasure Hunt

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

Start Hunting!

Translated by