# Boxcar function

> Mediated Wiki article. Canonical URL: https://mediated.wiki/source/Boxcar_function
> Markdown URL: https://mediated.wiki/source/Boxcar_function.md
> Source: https://en.wikipedia.org/wiki/Boxcar_function
> Source revision: 1317217349
> License: Creative Commons Attribution-ShareAlike 4.0 International (https://creativecommons.org/licenses/by-sa/4.0/)

{{Short description|Mathematical function resembling a boxcar}}
right|thumb|250px|A graphical representation of a boxcar function
In [mathematics](/source/mathematics), a '''boxcar function''' is any [function](/source/function_(mathematics)) which is zero over the entire [real line](/source/real_line) except for a single [interval](/source/interval_(mathematics)) where it is equal to a constant, ''A''.<ref>{{cite web| last=Weisstein|first=Eric W.|title=Boxcar Function|url=http://mathworld.wolfram.com/BoxcarFunction.html| publisher=MathWorld| accessdate=13 September 2013}}</ref> The function is named after its graph's resemblance to a [boxcar](/source/boxcar), a type of [railroad car](/source/railroad_car). The boxcar function can be expressed in terms of the [uniform distribution](/source/Uniform_distribution_(continuous)) as
<math display="block">\operatorname{boxcar}(x)= (b-a)A\,f(a,b;x) = A(H(x-a) - H(x-b)),</math>
where {{math|''f''(''a'',''b'';''x'')}} is the uniform distribution of ''x'' for the interval {{closed-closed|''a'', ''b''}} and <math>H(x)</math> is the [Heaviside step function](/source/Heaviside_step_function). As with most such [discontinuous functions](/source/continuous_function), there is a question of the value at the transition points, which are usually best chosen depending on the individual application.

When a boxcar function is selected as the [impulse response](/source/impulse_response) of a [filter](/source/Digital_filter), the result is a [simple moving average](/source/simple_moving_average) filter, whose [frequency response](/source/frequency_response) is a [sinc-in-frequency](/source/Sinc_filter), a type of [low-pass filter](/source/low-pass_filter).

==See also==
* [Boxcar averager](/source/Boxcar_averager)
* [Rectangular function](/source/Rectangular_function)
* [Step function](/source/Step_function)
* [Top-hat filter](/source/Top-hat_filter)
==References==
{{reflist}}

{{mathanalysis-stub}}
Category:Special functions

---
Adapted from the Wikipedia article [Boxcar function](https://en.wikipedia.org/wiki/Boxcar_function) by Wikipedia contributors ([contributor history](https://en.wikipedia.org/wiki/Boxcar_function?action=history)). Available under [Creative Commons Attribution-ShareAlike 4.0 International](https://creativecommons.org/licenses/by-sa/4.0/). Changes may have been made.
