Applies a Savitsky-Golay filter to the specified signal.
Namespace: Extreme.Mathematics.SignalProcessingAssembly: Extreme.Numerics.Net40 (in Extreme.Numerics.Net40.dll) Version: 6.0.16073.0 (6.0.16322.0)
public static Vector<double> SavitskyGolay(
Vector<double> signal,
int windowLength,
int order,
int derivative = 0,
Padding padding = Padding.None,
double paddedValue = 0
)
Public Shared Function SavitskyGolay (
signal As Vector(Of Double),
windowLength As Integer,
order As Integer,
Optional derivative As Integer = 0,
Optional padding As Padding = Padding.None,
Optional paddedValue As Double = 0
) As Vector(Of Double)
public:
static Vector<double>^ SavitskyGolay(
Vector<double>^ signal,
int windowLength,
int order,
int derivative = 0,
Padding padding = Padding::None,
double paddedValue = 0
)
static member SavitskyGolay :
signal : Vector<float> *
windowLength : int *
order : int *
?derivative : int *
?padding : Padding *
?paddedValue : float
(* Defaults:
let _derivative = defaultArg derivative 0
let _padding = defaultArg padding Padding.None
let _paddedValue = defaultArg paddedValue 0
*)
-> Vector<float>
Parameters
- signal
- Type: Extreme.MathematicsVectorDouble
The signal to filter. - windowLength
- Type: SystemInt32
The length of the smoothing window. Must be odd. - order
- Type: SystemInt32
The order of the local polynomial. - derivative (Optional)
- Type: SystemInt32
(Optional.) The order of the derivative. The default is 0. - padding (Optional)
- Type: Extreme.Mathematics.SignalProcessingPadding
(Optional.) Specifies how the signal is padded
for calculations near the lower and upper bounds. The default value is None. - paddedValue (Optional)
- Type: SystemDouble
(Optional.) If padding is
Constant, the value to use for padding; ignored otherwise.
Return Value
Type:
VectorDoubleThe filtered signal.
This method smooths a signal by fitting a regression polynomial of degree
order to a local neighbourhood of windowLength
points around each data point and replacing its value with the value of the polynomial.
The window length m
Optionally, a smoothed derivative of the signal may be computed.
The padding argument determines how calculations
will be performed near the boundaries of the signal. The default value,
None, indicates that the signal is not padded. Instead, the same polynomial
using the first or last windowLength points will be used
to compute the first and last few smoothed values.
Numerical Libraries
Supported in: 6.0
Reference