Found 9 packages
Implementation of rational number arithmetic for .NET with arbitrary precision.
A small library for computing Gower similarity coefficients in F#
For searching roots of polinoms by their coefficients
C# code to calculate the coefficients of the Butterworth filter and to filter the data This code calculates the coefficients of the Band-pass, Band-stop, Low-pass and High-pass Butterworth filters. It also filters the data, but no zero-phase delay is applied. The namespace is IIR_Butterworth_CS_Library. Each filter function will return a 2 rows x N coefficients 2D vector, where Row 1 = Numerator and Row 2 = Denumerator. The method "Check_stability_iir" can be used to check the stability of the filter. Please, keep in mind that if the filter is unstable, numerical instability leading to numerical overflow might happen when the order selected is extremely high. If that situation occurs, the program might assign a default value of 10^10 at the denominator. Band-pass: the function is "double[][] Lp2bp(double W_f1, double W_f2, int order_filt)". The first two arguments are the two normalized cut-off frequencies (f1/NF, f2/NF), where NF is the Nyquist frequency. This means that the cutoff frequencies must be within the interval of (0,1). The last argument is the order. Please, keep in mind that if you enter order_filt = 2, the order of the order will be 2 * order_filt = 4; Band-stop: the function is "double[][] Lp2bs(double W_f1, double W_f2, int order_filt)". The first two arguments are the two normalized cut-off frequencies (f1/NF, f2/NF), where NF is the Nyquist frequency. This means that the cutoff frequencies must be within the interval of (0,1). The last argument is the order. Please, keep in mind that if you enter order_filt = 2, the order of the order will be 2 * order_filt = 4; Low-pass: the function is "double[][] Lp2hp(double W_f1, int order_filt)". The first argument is the normalized cut-off frequency (f/NF), where NF is the Nyquist frequency. This means that the cutoff frequency must be within the interval of (0,1). The last argument is the order; High-pass: the function is "double[][] Lp2lp(double W_f1, int order_filt)". The first argument is the normalized cut-off frequency (f/NF), where NF is the Nyquist frequency. This means that the cutoff frequency must be within the interval of (0,1). The last argument is the order; Check the stability of the filter: the method is "bool Check_stability_iir(double[][] coeff_filt)". The argument is the 2D array containing the filter coefficients. It returns "true" if the filter is stable, "false" if it is unstable. 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. This code has been written following the Matlab code, so the arguments of each function reflect the arguments that you should pass to the equivalent functions in Matlab. I tried to be consistent with the names of the functions, in case someone wants to compare this code with Matlab code. The only exception is the function Check_stability_iir, which is not present in Matlab. If you have any question and/or want to report bugs, please e-mail me (Ale) at: pressalex@hotmail.com
A power series is characterized by an infinite list of coefficients: a0 + (a1 * x) + (a2 * x^2) + (a3 * x^3) + ... . For example, the power seres for cos x is 1 - x2/2! + x4/4! - x6/6! + ... and the coefficients for the powers of x in this series are 1, 0, -1/2, 0, 1/24, ... . This F# class library models the coefficients of a power series as an infinite, lazy list. The idea comes from a functional pearl by M. Douglas McIlroy called Power Series, Power Serious.
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
Code to calculate the coefficients of a notch, comb or peak filter C# code to calculate the coefficients of a notch, comb or peak filter. The name space is: Notch_Peak_Filter. Each filter function will return a 2 rows x N coefficients 2D vector, where Row 1 = Numerator and Row 2 = Denumerator. Notch Filter: the function is "double[][] IIRcomb_cpp(double order, double BW)". The first argument is the frequency to be notched normalized with respect the Nyquist frequency (0.0 < wo < 1), while the second one is the bandwidth (wo / N) of the filter. The default dB level of the bandwidth is ~3.0103 dB. This function has the overload "double[][] IIRcomb_cpp(double order, double BW, double AB)" allowing the user to choose the dB level of the bandwidth; Comb/Peak Filter: the function is "double[][] iircomb_cpp(double order, double BW, String type_filt)". The first two argument is the ratio (or order) between the frequency to be notched (F0) and the sampling frequency (SF)(F0/SF), the second one is the band width of the filter expressed as: (F0/(SF/2))/Q and the third one is a string that can be either "notch" (for the comb filter) or "peak" (for the peak filter). Please, remember that the ratio (order) needs to be an integer number. If the user inserts a ratio (order) that is not an integer, the code will return an empty matrix of coefficients. Also, if the user insert a string different from "notch" or "peak", the code will return an empty matrix of coefficients. The default dB level of the bandwidth is ~3.0103 dB. This function has the overload "double[][] iircomb_cpp(double order, double BW, double AB, String type_filt)" allowing the user to choose the dB level of the bandwidth; Filter the data: the method is "double[] Filter_Data_NCP(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 questions and/or want to report bugs, please e-mail me (Ale) at: pressalex@hotmail.com.
NPKTools.Optimizer.Preset is an preconfigured version of the NPKTools.Optimizer. It includes: 17 basic types of macronutrient fertilizers combined into 18 different sets to optimize the selection process. 17 types of micronutrient fertilizers grouped into four main sets: basic, sulfate, nitrate, and chelated. During the selection of macronutrient fertilizers, the service conducts two searches: in the first, sulfur is accounted for as specified, while the second search excludes sulfur coefficients to expand the possible options.
C# code to calculate the coefficients of the Elliptic filter and to filter the data. This code calculates the coefficients of the Band-pass, Band-stop, Low-pass and High-pass Elliptic filters. It also filters the data, but no zero-phase delay is applied. The name space is: IIR_Elliptic_Filter. The code follows the same steps as in Matlab. Each filter function will return a 2 rows x N coefficients 2D vector, where Row 1 = Numerator and Row 2 = Denumerator. The method "check_stability_iir" can be used to check the stability of the filter. Band-pass: the function is "double[][] Lp2bp (int, double, double, double, double)". The first three arguments are the order of the filter, the decibels of peak - to - peak passband ripple and the decibels of stopband attenuation down from the peak passband value, respectively. The last two arguments are the two normalized cut-off frequencies (f1/NF, f2/NF), where NF is the Nyquist frequency. This means that the cutoff frequencies must be within the interval of (0,1). Please, keep in mind that if you enter order_filt = 2, the order of the filter will be 2 * order_filt = 4; Band-stop: the function is " double[][] Lp2bs (int, double, double, double, double)". The first three arguments are the order of the filter, the decibels of peak - to - peak passband ripple and the decibels of stopband attenuation down from the peak passband value, respectively. The last two arguments are the two normalized cut-off frequencies (f1/NF, f2/NF), where NF is the Nyquist frequency. This means that the cutoff frequencies must be within the interval of (0,1). Please, keep in mind that if you enter order_filt = 2, the order of the filter will be 2 * order_filt = 4; High-pass: the function is " double[][] Lp2hp (int, double, double, double)". The first three arguments are the order of the filter, the decibels of peak - to - peak passband ripple and the decibels of stopband attenuation down from the peak passband value, respectively. The last argument is the normalized cut-off frequency (f/NF), where NF is the Nyquist frequency. This means that the cutoff frequencies must be within the interval of (0,1); Low-pass: the function is " double[][] Lp2lp (int, double, double, double)". The first three arguments are the order of the filter, the decibels of peak - to - peak passband ripple and the decibels of stopband attenuation down from the peak passband value, respectively. The last argument is the normalized cut-off frequency (f/NF), where NF is the Nyquist frequency. This means that the cutoff frequencies must be within the interval of (0,1); Check the stability of the filter: the method is " bool Check_stability_iir (double[][] coeff_filt)". The argument is the 2D array containing the filter coefficients. It returns "true" if the filter is stable, "false" if it is unstable. 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