init
This commit is contained in:
18
DataPRO/FftSharp/Windows/Welch.cs
Normal file
18
DataPRO/FftSharp/Windows/Welch.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
namespace FftSharp.Windows
|
||||
{
|
||||
public class Welch : Window, IWindow
|
||||
{
|
||||
public override string Name => "Welch";
|
||||
public override string Description =>
|
||||
"The Welch window is typically used for antialiasing and resampling. " +
|
||||
"Its frequency response is better than that of the Bartlett windowed cosc function below pi, " +
|
||||
"but it shows again a rather distinctive bump above.";
|
||||
|
||||
protected override double windowValue(int index, int size)
|
||||
{
|
||||
double halfN = (size - 1) / 2.0;
|
||||
double b = (index - halfN) / halfN;
|
||||
return 1 - b * b;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user