Using root function to complete the turning point function that solves the derivates of a polynomial

I was asked to complete the following turning point function using root function to solve the derivates of the polynomial up to x^n. I am really struggling with this one. Any help would be appreciated.
function x = turning_points(a)
% x = turning_points(a) returns the values of x such that p'(x) = 0, where
% p(x) = a(1) + a(2)x + a(3)x^2 + ... + a(n+1)x^n.

1 commentaire

The examples given are wrong.
The polynomial representation in MATLAB is in descending powers of x, thus
a = [2 1 0.5]
represents
p(x) = 2*x^2 + x + 0.5
and
a = [10 -9 3 1]
represents
p(x) = 10*x^3 - 9*x^2 + 3*x + 1

Connectez-vous pour commenter.

Réponses (1)

Hi Laidog,
I suggest starting with this doc page. It will show how to reperesent and analyze polynomials in Matlab and contains links to the functions needed to solve this problem.

Catégories

En savoir plus sur Polynomials dans Centre d'aide et File Exchange

Produits

Question posée :

le 27 Août 2022

Commenté :

le 27 Août 2022

Community Treasure Hunt

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

Start Hunting!

Translated by