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!