Piecewise Constant Function

Author

Eric W. Weisstein
April 15, 2004

This notebook downloaded from http://mathworld.wolfram.com/notebooks/Calculus/PiecewiseConstantFunction.nb.

For more information, see Eric's MathWorld entry http://mathworld.wolfram.com/PiecewiseConstantFunction.html.

©2005 Wolfram Research, Inc. except for portions noted otherwise

Initialization

<<Graphics`Colors`
<<Utilities`Typesetting`

2-D Examples

Show[GraphicsArray[
Plot[#,{x,0,3},PlotStyle->Red,
AxesLabel->TraditionalForm/@{x,#},
DisplayFunction->Identity]&/@{UnitStep[x-1],UnitStep[x-1]+UnitStep[x-2]}
]]

3-D Examples

Show[GraphicsArray[
{
Plot3D[Sqrt[#^2]/#&[x+I y],{x,-5,5},{y,-5,5},
PlotPoints->25,
AxesLabel->TraditionalForm/@{x,y,""},
PlotLabel->TraditionalForm[InlineFraction[Sqrt[z^2],z]],
DisplayFunction->Identity
],
Plot3D[Re[Floor[x+I y]],{x,-2,2},{y,-2,2},
PlotPoints->25,
AxesLabel->TraditionalForm/@{x,y,""},
PlotLabel->TraditionalForm[Re[Floor[z]]],
DisplayFunction->Identity
]
}]]