Close
Close window
converting - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Mozilla Firefox.
Maplesoft logo
Maplesoft logo

Online Help

All Products Maple MapleSim


[フレーム] [フレーム]

convert

convert an expression to a different form

Calling Sequence

convert(expr, form, arg3, ...)

Parameters

expr

-

any expression

form

-

name

arg3, ...

-

(optional) other arguments

Description

The convert function is used to convert an expression from one form to another. Some of the conversions are data-type conversions, for example convert([x, y], set) Others are form or function conversions, for example convert(x^3-3*x^2+7*x+9, horner, x) yields 9+(7+(-3+x)*x)*x and convert(a*x!, GAMMA) yields a*GAMMA(x+1).

For function conversions, a set of optional arguments to perform the conversion in different manners are described in convert/to_special_function .

The types of known conversions are (the second argument form must be one of these):

Further information is available under help pages convert/form where form is one of the forms from the above list.

A user can make custom conversions known to the convert function by defining a Maple procedure in the following way. If the procedure `convert/f` is defined, then the function call convert(a, f, x, y, ...) will invoke `convert/f`(a, x, y, ...); Note that the procedure may be indexed, for example convert([1,2,3], Vector[row]);

Examples

Convert can be used to convert numbers between bases. See the help pages convert/decimal , convert/base , convert/binary , convert/octal , and convert/hex for more information and examples.

>

convert9,binary

1001

(1)

Convert between degrees and radians. See the help pages convert/degrees and convert/radians for more information.

>

convertπ,degrees

180degrees

(2)

Convert to rational expressions or floating-point numbers. See the help pages convert/float and convert/rational for more information.

>

convert1.23456,rational

38583125

(3)
>

convert18,float,3

0.125

(4)

Convert between units. See the help page convert/units for more information. Also, see the Units package.

>

convert22,units,inches,m

13972500

(5)

Convert between Roman numerals and integers. See the help pages convert/arabic and convert/roman for more information.

>

convertXI,arabic

11

(6)

Convert all the operands of a list, set, or expression to addition or multiplication. See the help page convert/`+` for more information.

>

convert1,2,3,4,`+`

10

(7)
>

fseqxii,i=1..4

fx1,x22,x33,x44

(8)
>

convertf,`*`

x1x22x33x44

(9)

Convert a given list, set, or expression to 'and', 'or', or 'xor' form. See the help page convert/and for more information.

>

convertx,y,`and`

xandy

(10)

Convert a rational expression to partial fraction form. See the help page convert/parfrac for more information.

>

fx3+xx21

fx3+xx21

(11)
>

convertf,parfrac,x

x+1x1+1x+1

(12)

Convert a series to a polynomial by dropping the order term. See the help page convert/polynom for more information.

>

sseriesf,x,4

sx2x3+Ox5

(13)
>

converts,polynom

2x3x

(14)

Convert a complex expression to polar coordinates. See the help page convert/polar for more information.

>

convert12+I2,polar

polar22,π4

(15)

Convert an expression to trigonometric or exponential form, if possible. See the help pages convert/exp and convert/trig for more information.

>

gsinhx+sinx

gsinhx+sinx

(16)
>

convertg,exp

ⅇx2ⅇx2IⅇIxⅇ−Ix2

(17)

Check the list above for all known types of conversions for more possibilities. Conversions to more advanced mathematical functions are shown below.

>

hBesselJa,z

hBesselJa,z

(18)
>

jconverth,hypergeom

jzahypergeom,a+1,z24Γa+12a

(19)
>

convertj,Bessel

BesselJa,z

(20)


Download Help Document

AltStyle によって変換されたページ (->オリジナル) /