Error, (in PiecewiseTools:-Is) wrong kind of parameters in piecewise
Description
Examples
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.
Example 1:
In this case, the unassigned x is not an equality, inequality, or some Boolean combination of inequalities.
piecewisex,y;
Solution:
Replace the first argument with a valid condition. One possible solution is to express the function as
piecewisex>0,y;
{y0<x0otherwise
Example 2:
In the following example, the second condition isn't properly formed.
b≔−xx<2x2x+1x>2
x=2.
b≔−xx<2xx=2x+1x>2
b:={−xx<2xx=2x+12<x
See Also
piecewise
Download Help Document