Problem 42692. Polynomial Evaluation
Create a routine that takes a list of coefficients of a polynomial in order of increasing powers of x; together with a value of x to compute its value at, and return the value of the polynomial at that value using Horner's Rule.
For example: A fast scheme for evaluating a polynomial such as:
when
is to arrange the computation as follows:
Use of polyval and regexp is prohibited
Solution Stats
Problem Comments
-
3 Comments
Jihye Sofia Seo
on 9 Feb 2017
seems like a really fun and challenging problem!
Rafael S.T. Vieira
on 17 Sep 2020
Maybe the author should prohibit the use of polyval, str2num and regexp for this problem.
Subhashini Neelamegam
on 18 Oct 2021
Challenging Problem
Solution Comments
Show commentsProblem Recent Solvers58
Suggested Problems
-
Compute a dot product of two vectors x and y
988 Solvers
-
We love vectorized solutions. Problem 1 : remove the row average.
823 Solvers
-
453 Solvers
-
146 Solvers
-
Determine the Anti-diagonal of a Magic Square
109 Solvers
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!