Skip to content

UnitStep ​

The unit step function: 0 for x < 0 and 1 for x >= 0.

✓ checked against that system · ! checked, with disagreements (hover a chip)Wolfram LanguageUnitStep✓
UnitStep(x)0 if x < 0, 1 if x >= 0.
UnitStep(x1, x2, …)the product of the unit steps -- 0 as soon as any argument is negative.
Typed signatures
TypePackageApplies
(list<number> | number, number*) -> list<number> | numberanalyticalways

Domain: Elementary functions

Details
  • 1 at exactly 0, unlike Heaviside's 12\tfrac12 there.
  • Several arguments: 0 the moment any one of them is negative, 1 otherwise -- the multivariate step used for a region like x≥0∧y≥0x \ge 0 \wedge y \ge 0.
  • A single list argument threads element-wise; several scalar arguments combine as above -- the two call forms are not the same shape.

Examples

Basic #
live ↗
InUnitStep(−1)\mathrm{UnitStep}(-1)Out00

1 at 0, unlike Heaviside's 1/2

live ↗
InUnitStep(0)\mathrm{UnitStep}(0)Out11
live ↗
InUnitStep(2.5)\mathrm{UnitStep}(2.5)Out11
Scope #

Threads element-wise over a list

live ↗
InUnitStep([−1,0,1])\mathrm{UnitStep}(\bigl\lbrack-1, 0, 1\bigr\rbrack)Out[0,1,1]\bigl\lbrack0, 1, 1\bigr\rbrack

Several arguments: the product of their unit steps

live ↗
InUnitStep(1,2)\mathrm{UnitStep}(1, 2)Out11

Zero as soon as any argument is negative

live ↗
InUnitStep(1,−1)\mathrm{UnitStep}(1, -1)Out00

Exact numeric arguments

live ↗
InUnitStep(π−3)\mathrm{UnitStep}(π-3)Out11
Properties #
live ↗
InUnitStep(12)2\mathrm{UnitStep}(\frac{1}{2})^2Out11

Known value · Wolfram MathematicalFunctionData, UnitStep, FunctionalEquations

live ↗
InUnitStep(2)UnitStep(12)\mathrm{UnitStep}(2)\mathrm{UnitStep}(\frac{1}{2})Out11

Known value · Wolfram MathematicalFunctionData, UnitStep, FunctionalEquations

About
Examples9
Checked againstWolfram Language 9 agree
CrosswalkWolfram Language