Error, (in PiecewiseTools:-Is) Wrong kind of parameters in piecewise - Maple Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Error, (in PiecewiseTools:-Is) Wrong kind of parameters in piecewise

Error, (in PiecewiseTools:-Is) Wrong kind of parameters in piecewise

 

Description

Examples

See Also

Description

You can express piecewise-continuous functions using the piecewise function. The piecewise function takes as its parameters a condition (or conditions) and an associated expression (or expressions), should the condition evaluate to true.  For more information on the piecewise function, see the piecewise help page.

 

The conditions must be an equality or inequality, or a Boolean combination of inequalities.  The wrong kind of parameters in piecewise error occurs when any of the conditional arguments are not Boolean-valued (they do not evaluate to true or false).

 

You can also encounter this error when using the 2-D math notation for a piecewise expression.  Again, it indicates that the conditions are not Boolean-valued.  See the second example.

Examples

Example 1:

In this case, the unassigned x is not an equality, inequality, or some Boolean combination of inequalities.

piecewisex,y;

Error, (in PiecewiseTools:-Is) Wrong kind of parameters in piecewise

 

Solution:

Replace the first argument with a valid condition.  One possible solution is to express the function as

piecewisex>0,y;

&lcub;y0<x0otherwise

(2.1)

Example 2:

In the following example, the second condition isn't properly formed.

bxx<2x2x&plus;1x&gt;2

Error, (in PiecewiseTools:-Is) Wrong kind of parameters in piecewise

 

Solution:

x&equals;2.

bxx<2xx&equals;2x&plus;1x&gt;2

b:=&lcub;xx<2xx&equals;2x&plus;12<x

(2.2)

See Also

piecewise