Smoothing.Get Savitsky Golay Coefficients Method
Definition
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.3
Overload List
Get | Constructs a vector containing the coefficients of a 2nd degree Savitsky-Golay filter with the specified parameters. |
Get | Constructs a vector containing the coefficients of a Savitsky-Golay filter with the specified span and polynomial degree. |
Get | Constructs a vector containing the coefficients of a symmetrical Savitsky-Golay filter with the specified parameters. |
Get | Constructs a vector containing the coefficients of a Savitsky-Golay filter or a derivative filter with the specified parameters. |
GetSavitskyGolayCoefficients(Int32)
public static Vector<double> GetSavitskyGolayCoefficients(
int span
)
Parameters
- span Int32
- The number of points in the filter.
Return Value
Vector<Double>A vector that contains the coefficients of the Savitsky-Golay filter.
Remarks
The span must be odd, and must be greater than 2.
The return value of this method can be used to smooth a numerical variable by calling the WeightedMovingAverage(Vector<Double>, Vector<Double>) method of its Filter property.
Exceptions
Argument | span is less than zero. |
Argument | span is less than or equal to 2. |
GetSavitskyGolayCoefficients(Int32, Int32)
public static Vector<double> GetSavitskyGolayCoefficients(
int span,
int polynomialDegree
)
Parameters
Return Value
Vector<Double>A vector that contains the coefficients of the Savitsky-Golay filter.
Remarks
The span must be odd, and must be greater than the degree of the polynomial.
The return value of this method can be used to smooth a numerical variable by calling the WeightedMovingAverage(Vector<Double>, Vector<Double>) method of its Filter property.
Exceptions
Argument | span is less than zero. -or- polynomialDegree is less than zero. |
Argument | span is less than or equal to polynomialDegree. |
GetSavitskyGolayCoefficients(Int32, Int32, Int32)
public static Vector<double> GetSavitskyGolayCoefficients(
int span,
int polynomialDegree,
int currentWeightIndex
)
Parameters
- span Int32
- The number of points in the filter.
- polynomialDegree Int32
- The order of the polynomial.
- currentWeightIndex Int32
- The index in the weight vector of the weight for the current point.
Return Value
Vector<Double>A vector that contains the coefficients of the Savitsky-Golay filter.
Remarks
The span must be greater than the degree of the polynomial.
The return value of this method can be used to smooth a numerical variable by calling the WeightedMovingAverage(Vector<Double>, Vector<Double>) method of its Filter property.
Exceptions
Argument | span is less than zero. -or- polynomialDegree is less than zero. -or- currentWeightIndex is less than zero or greater than or equal to span. |
Argument | span is less than or equal to polynomialDegree. |
GetSavitskyGolayCoefficients(Int32, Int32, Int32, Int32)
public static Vector<double> GetSavitskyGolayCoefficients(
int span,
int polynomialDegree,
int currentWeightIndex,
int derivativeOrder
)
Parameters
- span Int32
- The number of points in the filter.
- polynomialDegree Int32
- The order of the polynomial.
- currentWeightIndex Int32
- The index in the weight vector of the weight for the current point.
- derivativeOrder Int32
- The order of the derivative for which to compute the coefficients.
Return Value
Vector<Double>A vector that contains the coefficients of the Savitsky-Golay filter.
Remarks
The span must be greater than the degree of the polynomial.
The return value of this method can be used to smooth a numerical variable by calling the WeightedMovingAverage(Vector<Double>, Vector<Double>) method of its Filter property.
Exceptions
Argument | span is less than zero. -or- polynomialDegree is less than zero. -or- currentWeightIndex is less than zero or greater than or equal to span. -or- derivativeOrder is less than zero or greater than the polynomial order. |
Argument | span is less than or equal to polynomialDegree. |