how can i find x value from given y (6th degree polynomial)

3 views (last 30 days)
y = [7 12 18 27 35 39];
p1 = 3.7739e-21
p2 = -6.5969e-17
p3 = 2.2715e-13
p4 = 1.1034e-09
p5 = -4.8986e-06
p6 = 0.010416
p7 = -0.70896
y = p1*x^6 + p2*x^5+p3*x^4+p4*x^3+p5*x^2+p6*x+p7;

Accepted Answer

Matt J
Matt J on 9 Jul 2021
x=roots([p1,p2,p3,p4,p5,p6,p7-y])
  9 Comments
firrou bouteflika
firrou bouteflika on 19 Dec 2021
i see thank you and i just realized i can use polyval
h = polyval(p,[16.27 27.9 41.86 62.79 81.39 90.69])

Sign in to comment.

More Answers (0)

Tags

Products


Release

R2012a

Community Treasure Hunt

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

Start Hunting!