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?

 채택된 답변

Honglei Chen
Honglei Chen 2012년 2월 21일

1 개 추천

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

추가 답변 (1개)

Walter Roberson
Walter Roberson 2012년 2월 21일

1 개 추천

roots( [a, b, c, d-y] )

카테고리

도움말 센터File Exchange에서 Polynomials에 대해 자세히 알아보기

태그

질문:

2012년 2월 21일

편집:

2013년 10월 19일

Community Treasure Hunt

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

Start Hunting!

Translated by