type/piecewise - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Programming : Data Types : Type Checking : Types : type/piecewise

type/piecewise

determine whether the given expression is a piecewise function

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

type/piecewise(expr, x);

Parameters

expr

-

any expression

x

-

(optional) main variable

Description

• 

The call type(expr, piecewise) returns true if expr is a piecewise function.

• 

The call type(expr, piecewise(x)) checks, in addition, that the argument that x appears at least in one of the piecewise conditions involved in expr.

Examples

typepiecewise&lsqb;&rsqb;x<1&comma;a&comma;b&comma;&apos;piecewise&apos;

true

(1)

typepiecewisex<1&comma;a&comma;b&comma;&apos;piecewise&apos;

true

(2)

typepiecewisex<1&comma;a&comma;b&comma;&apos;piecewise&apos;x

true

(3)

typepiecewisex<1&comma;a&comma;b&comma;&apos;piecewise&apos;a

false

(4)

See Also

piecewise

type/mathfunc