Help CenterHelp 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
您点击的链接对应于以下 MATLAB 命令:
请在 MATLAB 命令行窗口中直接输入以执行命令。Web 浏览器不支持 MATLAB 命令。
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:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office