Help Center
Horner nested polynomial representation
horner(p)
horner(p,var)
horner(p) returns the Horner form of the polynomial p.
p
example
horner(p,var) uses the variable in var.
var
collapse all
Find the Horner representation of a polynomial.
syms x p = x^3 - 6*x^2 + 11*x - 6; horner(p)
ans = x*(x*(x - 6) + 11) - 6
Specify the variable in the polynomial by using the second argument.
syms a b y p = a*y*x^3 - y*x^2 - 11*b*y*x + 2; horner(p,x)
ans = 2 - x*(11*b*y + x*(y - a*x*y))
horner(p,y)
ans = 2 - y*(- a*x^3 + x^2 + 11*b*x)
Polynomial, specified as a symbolic expression or function, or an array of symbolic expressions or functions.
Variable, specified as a symbolic variable or an array of symbolic variables.
Introduced before R2006a
collect | combine | expand | factor | numden | rewrite | simplify | simplifyFraction
collect
combine
expand
factor
numden
rewrite
simplify
simplifyFraction
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
Europe
Asia Pacific
Contact your local office