MATLAB: Numerically solve for x in a polynomial equation

polynomial

If I have a 3rd order polynomial (y = ax^3 + bx^2 + cx + d) with all the coefficients known, how do I plug in a y number and get out the x number?

Best Answer

Write the polynomial as
a*x^3+b*x^2+c*x+d-y
Then you can use fzero to solve x.
doc fzero
Related Question