MATLAB 帮助中心
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.
选择网站
选择网站以获取翻译的可用内容,以及查看当地活动和优惠。根据您的位置,我们建议您选择:。
您也可以从以下列表中选择网站:
如何获得最佳网站性能
选择中国网站(中文或英文)以获得最佳网站性能。其他 MathWorks 国家/地区网站并未针对您所在位置的访问进行优化。
美洲
欧洲
亚太
联系您当地的办事处