Files
DP44/DataPRO/FftSharp/Windows/Bartlett.cs
2026-04-17 14:55:32 -04:00

18 lines
559 B
C#
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
using System;
namespace FftSharp.Windows
{
public class Bartlett : Window, IWindow
{
public override string Name => "BartlettHann";
public override string Description =>
"The BartlettHann window is triangular in shape (a 2nd order B-spline) which is effectively the " +
"convolution of two half-sized rectangular windows.";
protected override double windowValue(int index, int size)
{
return 1 - Math.Abs((double)(index - (size / 2)) / (size / 2));
}
}
}