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 个评论
Torsten
2022-8-27
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
回答(1 个)
Paul
2022-8-27
0 个投票
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.
类别
在 帮助中心 和 File Exchange 中查找有关 Polynomials 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!