Piecewise
Usage
• Piecewise[{{ , }, { , }, ... }] represents a piecewise function with values in the regions defined by the conditions . • Piecewise[{{ , }, ... }, val] uses default value val if none of the apply. The default for val is 0.
Notes
• The  are typically inequalities such as a x < b. • The  are evaluated in turn, until one of them is found to yield True. • If all preceding  yield False, then the  corresponding to the first  that yields True is returned as the value of the piecewise function. • If any of the preceding  do not literally yield False, the Piecewise function is returned in symbolic form. • Only those  explicitly included in the returned form are evaluated. • Elements of the form { , False} are dropped, as are all elements after the first { , True}. • See also: Which, PiecewiseExpand, Boole, If, Max, Clip, UnitStep, Abs, Sign, Floor, InterpolatingFunction, $MaxPiecewiseCases. • New in Version 5.1.
|