MATLAB: Replacing variables with dumthe variables

substitution of variables

Hello everyone,
I have obtained a really long equation in Matlab containing a lot of variables. Is there a function in Matlab that can find N suitable dummy variables in which it can compress the found combinations of the actual variables?
Forex:
y(x) = A*log(x)+A*B*sin(x)+C*e^x
Where:
A = 2*a+b+5*c+2*d
B = c+d/a
C = a^2+c^4/b+b/2
(the actual equation is much longer)
Thanks in advance!

Best Answer

The only one that I can think of is the Symbolic Math Toolbox coeffs (link) function. Others, such as simplify (link), and related functions linked to on that page, could also be useful.
Related Question