Main Content
piecewise
Conditionally defined expression or function
Syntax
Description
Examples
Input Arguments
Output Arguments
Tips
piecewise
does not check for overlapping or conflicting conditions. A piecewise expression returns the value of the first true condition and disregards any following true expressions. Thus,piecewise
mimics an if-else ladder.
Version History
Introduced in R2016b
See Also
and
| assume
| assumeAlso
| assumptions
| if
| in
| isAlways
| not
| or