Maple Professional
Maple Academic
Maple Student Edition
Maple Personal Edition
Maple Player
Maple Player for iPad
MapleSim Professional
MapleSim Academic
Maple T.A. - Testing & Assessment
Maple T.A. MAA Placement Test Suite
Möbius - Online Courseware
Machine Design / Industrial Automation
Aerospace
Vehicle Engineering
Robotics
Power Industries
System Simulation and Analysis
Model development for HIL
Plant Modeling for Control Design
Robotics/Motion Control/Mechatronics
Other Application Areas
Mathematics Education
Engineering Education
High Schools & Two-Year Colleges
Testing & Assessment
Students
Financial Modeling
Operations Research
High Performance Computing
Physics
Live Webinars
Recorded Webinars
Upcoming Events
MaplePrimes
Maplesoft Blog
Maplesoft Membership
Maple Ambassador Program
MapleCloud
Technical Whitepapers
E-Mail Newsletters
Maple Books
Math Matters
Application Center
MapleSim Model Gallery
User Case Studies
Exploring Engineering Fundamentals
Teaching Concepts with Maple
Maplesoft Welcome Center
Teacher Resource Center
Student Help Center
convert/piecewise - convert to a piecewise function
Calling Sequence
convert( expr, piecewise )
convert( expr, piecewise, var)
Parameters
expr
-
expression
piecewise
literal name
var
name representing the main variable
Description
Converts an expression containing Heaviside, abs, signum, or `if` to a piecewise function. If the expression has the form , the must be replaced by If to avoid evaluation. If the expression contains more than one name, the argument var specifies the variable with respect to which the function is piecewise.
convert/piecewise can be used to compute the normal form of an expression involving piecewise, Heaviside, abs, signum, min, or max with respect to the variable var.
When converting Heaviside to piecewise you can perform the conversion taking Heaviside(0) = 1. For that purpose set the Environment Variable _EnvUseHeavisideAsUnitStep to true; see the last example.
Examples
Converting signum taking its value at zero from its _Environment variable
Converting Heaviside(x) taking Heaviside(0) = 1
See Also
_Env, abs, convert/Heaviside, Heaviside, piecewise, signum
Download Help Document