The Bartlett window is very similar to a triangular window, except that the endpoints are at zero. It is often used in signal processing for tapering a signal, without generating too much ripple in the frequency domain.
Parameters(numpy.bartlett(M)): M : int Number of points in the output window. If zero or less, an empty array is returned. Returns: out : array
The triangular window, with the maximum value normalized to one (the value one appears only if the number of samples is odd), with the first and last samples equal to zero.
[ 0. 0.18181818 0.36363636 0.54545455 0.72727273 0.90909091 0.90909091 0.72727273 0.54545455 0.36363636 0.18181818 0. ]
Plotting the window and its frequency response (requires SciPy and matplotlib):
- Python | Numpy numpy.ndarray.__floordiv__()
- Python | Numpy numpy.ndarray.__add__()
- Python | Numpy numpy.ndarray.__sub__()
- Python | Numpy numpy.ndarray.__imul__()
- Python | Numpy numpy.ndarray.__lshift__()
- Python | Numpy numpy.ndarray.__mul__()
- Python | Numpy numpy.ndarray.__mod__()
- Python | Numpy numpy.ndarray.__rshift__()
- Python | Numpy numpy.ndarray.__pow__()
- Python | Numpy numpy.ndarray.__divmod__()
- Python | Numpy numpy.ndarray.__invert__()
- Python | Numpy numpy.ndarray.__truediv__()
- Python | Numpy numpy.ndarray.__xor__()
- Python | Numpy numpy.ndarray.__iadd__()
- Python | Numpy numpy.ndarray.__isub__()
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.