FIR_Hamming_Filter 1.0.5

.NET 6.0
NuGet\Install-Package FIR_Hamming_Filter -Version 1.0.5
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
dotnet add package FIR_Hamming_Filter --version 1.0.5
<PackageReference Include="FIR_Hamming_Filter" Version="1.0.5" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add FIR_Hamming_Filter --version 1.0.5
#r "nuget: FIR_Hamming_Filter, 1.0.5"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install FIR_Hamming_Filter as a Cake Addin
#addin nuget:?package=FIR_Hamming_Filter&version=1.0.5

// Install FIR_Hamming_Filter as a Cake Tool
#tool nuget:?package=FIR_Hamming_Filter&version=1.0.5

C# code to calculate the coefficients of a FIR filter with Hamming window and to filter the data

This code calculates the coefficients of the Band-pass, Band-stop, Low-pass and High-pass FIR filters. It also filters the data, but no zero-phase delay is applied. The namespace is FIR_HAMM.


Each filter function will return a 2 rows x N coefficients 2D vector, where Row 1 = Numerator and Row 2 = Denumerator.

Band-pass: the function is "double[][] Fir_LP (int filt_order, double sf, double f1, double f2)". The first argument if the order of the filter, the second one if the sampling frequency, while the last two arguments are the two cut-off frequencies f1 and f2;

Band-stop: the function is "double[][] Fir_LP (int filt_order, double sf, double f1, double f2)". The first argument if the order of the filter, the second one if the sampling frequency, while the last two arguments are the two cut-off frequencies f1 and f2. If the order of the filter is odd, it will be increased by 1, as odd order symmetric FIR filters must have a gain of zero at the Nyquist frequency;

Low-pass: the function is "double[][] Fir_LP(int filt_order, double sf, double f1)". The first argument if the order of the filter, the second one if the sampling frequency, while the last one is the cut-off frequency f1;

High-pass: the function is "double[][] Fir_HP(int filt_order, double sf, double f1)". The first argument if the order of the filter, the second one if the sampling frequency, while the last one is the cut-off frequency f1. If the order of the filter is odd, it will be increased by 1, as odd order symmetric FIR filters must have a gain of zero at the Nyquist frequency;

Filter the data: the method is "double[] Filter_Data(double[][] coeff_filt, double[] pre_filt_signal)". The two arguments are the filter coefficients and the signal to be filtered. It returns the filtered signal.

If you have any question and/or want to report bugs, please e-mail me (Ale) at: pressalex@hotmail.com

Product Versions
.NET net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.5 69 8/9/2022