Vector Extensions.Moving Standard Deviation Method
Returns a vector whose observations are the standard deviation
of a range of observations of the vector.
Definition
Namespace: Numerics.NET.DataAnalysis
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.4
C#
A vector.
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.4
public static Vector<double> MovingStandardDeviation(
this Vector<double> vector,
int length,
Vector<double> simpleMovingAverage
)
Parameters
- vector Vector<Double>
- The vector to transform.
- length Int32
- The number of observations in the range.
- simpleMovingAverage Vector<Double>
- A vector that contains the simple moving average of the vector over the same length.
Return Value
Vector<Double>A vector.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type Vector<Double>. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).Remarks
If length is equal to 1, this method returns the original vector.
The new vector gets the name stdev<length>(<name>), where <name> is the name of the original vector.
Exceptions
Argument | length is less than or equal to one. |
Argument | simpleMovingAverage is null. |
Dimension | The length of simpleMovingAverage does not match the length of the vector. |