MATLAB: How to find the value for X for given Y on a function

formulastudentMATLAB

Hello everybody. I have a polynomial function "y = p1*x^n + p2*x^(n-1) + … pn". This function was defined using the comando "Polyfit" based on some points, resulting in a fourth order equation. Then this equation was integrated, resulting in a fifth order equation. As the value of "y" was previously calculated, I need to know the value for "x". How can I do that?
Thanks.

Best Answer

With the roots() function.