piecewise - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


convert/piecewise

convert to a piecewise function

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

convert( expr, piecewise )

convert( expr, piecewise, var)

Parameters

expr

-

expression

piecewise

-

literal name

var

-

name representing the main variable

Description

• 

Converts an expression containing Heaviside, abs, signum, or `if` to a piecewise function. If the expression has the form , the  must be replaced by If to avoid evaluation. If the expression contains more than one name, the argument var specifies the variable with respect to which the function is piecewise.

• 

convert/piecewise can be used to compute the normal form of an expression involving piecewise, Heaviside, abs, signum, min, or max with respect to the variable var.

• 

When converting Heaviside to piecewise you can perform the conversion taking Heaviside(0) = 1. For that purpose set the Environment Variable _EnvUseHeavisideAsUnitStep to true; see the last example.

Examples

(1)

(2)

(3)

(4)

(5)

Converting signum taking its value at zero from its _Environment variable

(6)

(7)

(8)

Converting Heaviside(x) taking Heaviside(0) = 1

(9)

(10)

See Also

_Env

abs

convert/Heaviside

Heaviside

piecewise

signum

 


Download Help Document