return a univariate polynomial from a Vector of coefficients - Maple Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Mathematics : Algebra : Polynomials : PolynomialTools : PolynomialTools/FromCoefficientList

PolynomialTools[FromCoefficientVector] - return a univariate polynomial from a Vector of coefficients

PolynomialTools[FromCoefficientList] - return a univariate polynomial from list of coefficients

Calling Sequence

FromCoefficientList(L, x, opts)

FromCoefficientVector(L, x, opts)

Parameters

L

-

list of coefficients

x

-

name for the polynomial variable

opts

-

(optional) equations of the form option=value (see below)

Description

• 

The FromCoefficientList(L, x) calling sequence returns a polynomial in x from a list of coefficients.  

• 

The FromCoefficientVector(L, x) calling sequence returns a polynomial in x from a vector of coefficients.  

• 

These are inverse commands to CoefficientList and CoefficientVector.

• 

FromCoefficientVector is written to handle sparse Vector inputs efficiently.

Examples

withPolynomialTools:

FromCoefficientList1,1,2,3,x

3x3+2x2x+1

(1)

FromCoefficientList1,1,2,3,x,form=horner

x1+x2+3x+1

(2)

FromCoefficientList1,0,0,2,0,x,termorder=reverse

x4+2x

(3)

FromCoefficientVectory3,y2,y2,1,x

y3y2x+y2x2+x3

(4)

FromCoefficientList,x

0

(5)

FromCoefficientVectorCoefficientVector0,x,x

0

(6)

Most vector shapes will be handled efficiently

v1:=Vector500000001,shape=unit300:

FromCoefficientVectorv1,x

x300

(7)

v2:=Vector200000001,shape=scalar50000,a:

FromCoefficientVectorv2,x

ax50000

(8)

v3:=Vector10,shape=constantb21:

FromCoefficientVectorv3,x

b21x9+x8+x7+x6+x5+x4+x3+x2+x+1

(9)

v4:=Vector1000000001,1=5,1000000001=1,storage=sparse:

FromCoefficientVectorv4,x

x1000000000+5

(10)

See Also

convert,horner, PolynomialTools, PolynomialTools[CoefficientVector], Vector


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam