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

Online Help

All Products    Maple    MapleSim


charfcn

characteristic function for expressions and sets

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

charfcn[A](x)

Parameters

x

-

any algebraic expression

A

-

specification for a set

Description

• 

The charfcn function is the characteristic function of the "set" A.  It is defined to be

charfcnAx={1xA0xA'charfcnAx' otherwise

• 

The set specification A can be a set, a real numeric, a complex numeric, a real numeric range, a complex numeric range, an arbitrary range, or an expression sequence of any of the previous.  The meaning of each one of these is as follows

A can be:

"in" () means:

-----------

--------------------

a set

set membership

a real or complex numeric

equality

a real numeric range, a..b

axb

a complex numeric range, a..b

axb and axb (so a is the bottom left corner, b is the top right corner)

an arbitrary range, a..b

axb, as determined by signum0-- note that a,b,x must all evaluate to 0

an expression sequence of any of the above (except set)

"or" of the above conditions

an expression sequence of sets

set membership in the union of the sets

• 

When the specification is a set, the maple function member is used to test set membership, and thus charfcn will always return one of 0 or 1 in this case.  In the other cases, charfcn is symbolic, in that it will return unevaluated if the "in" conditions cannot be verified or the specification is not exactly as described above.

• 

Ranges a..b where b<a are treated as empty, and so charfcn will return 0 for all input.

Examples

charfcn3,5,90

0

(1)

charfcn3,5,93

1

(2)

charfcn3,5,9x

charfcn3,5,9x

(3)

charfcn3.13..3.16π

1

(4)

charfcn0..3,5..76

1

(5)

charfcnone&comma;three&comma;twofour

0

(6)

charfcnone&comma;three&comma;twotwo

1

(7)

charfcn1+I..3+2I2+I

1

(8)

charfcn3+I..3+2I,7,π..π2expy3

charfcn3+I..3+2I,7,π..π2&ExponentialE;y3

(9)

assume1.1<y&comma;y<1.3

charfcn3+I..3+2I,7,π..π2expy3

1

(10)

charfcn3+I..1+2Ix

0

(11)

See Also

evalc

member

piecewise

signum