Numerically solve for x in a polynomial equation

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?

 Respuesta aceptada

Honglei Chen
Honglei Chen el 21 de Feb. de 2012
Write the polynomial as
a*x^3+b*x^2+c*x+d-y
Then you can use fzero to solve x.
doc fzero

Más respuestas (1)

Walter Roberson
Walter Roberson el 21 de Feb. de 2012
roots( [a, b, c, d-y] )

Categorías

Más información sobre Polynomials en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 21 de Feb. de 2012

Editada:

el 19 de Oct. de 2013

Community Treasure Hunt

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

Start Hunting!

Translated by