Previous Up Next

5.27.1  Boxcar function : boxcar

The boxcar command takes three arguments: real numbers a , b and an identifier or an expression x . It returns u(xa)−u(xb) , where u is the Heaviside function. The resulting expression defines a function which is zero everywhere except within the segment [a,b] , where its value is equal to 1.

For example, input :

boxcar(1,2,x)

Output :

Heaviside(x-1)-Heaviside(x-2)

Input :

boxcar(1,2,3/2)

Output :

1

Input :

boxcar(1,2,0)

Output :

0

Previous Up Next