In
mathematics
Mathematics is a field of study that discovers and organizes methods, Mathematical theory, theories and theorems that are developed and Mathematical proof, proved for the needs of empirical sciences and mathematics itself. There are many ar ...
, a boxcar function is any
function which is zero over the entire
real line
A number line is a graphical representation of a straight line that serves as spatial representation of numbers, usually graduated like a ruler with a particular origin (geometry), origin point representing the number zero and evenly spaced mark ...
except for a single
interval where it is equal to a constant, ''A''.
The function is named after its graph's resemblance to a
boxcar
A boxcar is the North American (Association of American Railroads, AAR) and South Australian Railways term for a Railroad car#Freight cars, railroad car that is enclosed and generally used to carry freight. The boxcar, while not the simpl ...
, a type of
railroad car
A railroad car, railcar (American English, American and Canadian English), railway wagon, railway carriage, railway truck, railwagon, railcarriage or railtruck (British English and International Union of Railways, UIC), also called a tra ...
. The boxcar function can be expressed in terms of the
uniform distribution as
where is the uniform distribution of ''x'' for the interval and
is the
Heaviside step function
The Heaviside step function, or the unit step function, usually denoted by or (but sometimes , or ), is a step function named after Oliver Heaviside, the value of which is zero for negative arguments and one for positive arguments. Differen ...
. As with most such
discontinuous functions, there is a question of the value at the transition points. These values are probably best chosen for each individual application.
When a boxcar function is selected as the
impulse response
In signal processing and control theory, the impulse response, or impulse response function (IRF), of a dynamic system is its output when presented with a brief input signal, called an impulse (). More generally, an impulse response is the reac ...
of a
filter, the result is a
simple moving average filter, whose
frequency response
In signal processing and electronics, the frequency response of a system is the quantitative measure of the magnitude and Phase (waves), phase of the output as a function of input frequency. The frequency response is widely used in the design and ...
is a
sinc-in-frequency, a type of
low-pass filter
A low-pass filter is a filter that passes signals with a frequency lower than a selected cutoff frequency and attenuates signals with frequencies higher than the cutoff frequency. The exact frequency response of the filter depends on the filt ...
.
See also
*
Boxcar averager
A boxcar averager, gated integrator or boxcar integrator is an electronic test instrument that integral, integrates the signal input voltage after a defined waiting time (trigger delay) over a specified period of time (gate width) and then average ...
*
Rectangular function
The rectangular function (also known as the rectangle function, rect function, Pi function, Heaviside Pi function, gate function, unit pulse, or the normalized boxcar function) is defined as
\operatorname\left(\frac\right) = \Pi\left(\frac\ri ...
*
Step function
In mathematics, a function on the real numbers is called a step function if it can be written as a finite linear combination of indicator functions of intervals. Informally speaking, a step function is a piecewise constant function having on ...
*
Top-hat filter
References
{{mathanalysis-stub
Special functions