MATLAB: How to express a variable into one other

Symbolic Math Toolbox

I have a symbolic equation in which y is an function of x (y and x are the symbolic variables). I would like to turn it around, I would like to have x as a function of y.
for example instead of y=ax^4+bx^3+cx^2+dx+f I would like to have x=gy^4+hy^3+jy^2+ky+l
How can I do this?

Best Answer

Use the Symbolic Toolbox's solve()
solve((a*x^4+b*x^3+c*x^2+d*x+f) - (y), x)
You will not get a polynomial result for solving a generalized polynomial of degree two or high. For example let "a" and "b" and "d" and f be 0 so you are solving
y = c*x^2
then you know
y/c = x^2
and so
x = -sqrt(y/c) and x = +sqrt(y/c)
this is not a polynomial.