init
This commit is contained in:
17
DataPRO/FftSharp/Windows/Bartlett.cs
Normal file
17
DataPRO/FftSharp/Windows/Bartlett.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using System;
|
||||
|
||||
namespace FftSharp.Windows
|
||||
{
|
||||
public class Bartlett : Window, IWindow
|
||||
{
|
||||
public override string Name => "Bartlett–Hann";
|
||||
public override string Description =>
|
||||
"The Bartlett–Hann 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));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user