Raises a polynomial to a non-negative integer power
Syntax
q = polypower(p,k)
Description
q = polypower(p,k) returns the polynomial q (in MATLAB® polynomial form) that results from raising polynomial p to a non-negative integer power of k.
Examples
Example 1 − The efficiency of the polypower function
Raising a polynomial to a power can also be accomplished using the MATLAB® Symbolic Math Toolbox, but at a much slower rate than that offered by the polypower function. Consider, for example, the polynomial
raised to the power of 3. This can be accomplished using symbolics:
tic
sym2poly(expand((sym(‘x’)^2+sym(‘x’)+1)^3))
toc
or the polypower function:
tic
polypower([1 1 1],3)
toc
which accomplishes the task at a much faster rate.
This function is part of……..