Matrix.StdDev Method

Overload List

#SignatureDescription
1Double StdDevStandard deviation.
└ indexed: Double StdDev(Int32 Index, Int32 Len)
2TCplx StdDev(TCplx AMean)Returns the standard deviation of all calling object complex elements.
└ indexed: TCplx StdDev(TCplx AMean, Int32 Index, Int32 Len)
3Double StdDev(Double AMean)Returns the standard deviation of all calling object elements.
└ indexed: Double StdDev(Double AMean, Int32 Index, Int32 Len)

Overload 1: Double StdDev

Standard deviation.

Returns: Double

Remarks:

Calculate the standard deviation of all calling object elements. The result is a real value. An exception is raised if calling Matrix Dew.Math.Matrix.Complex property is true.

Examples
Matrix a = new Matrix();
a.SetIt(2, 2, false, new double[] { 1.0, 2.0, 3.0, 4.0 });
double result = a.StdDev();
if (Math.Abs(result - 1.29099444873581) > 1e-10)
    throw new Exception("Matrix.StdDev: expected 1.29099444873581, got " + result);
Matrix a;
double c;
double aMean;
a.SetIt(2,2,false,new double[] {1,2,3,4});
aMean = a.Mean;
c = a.StdDev(aMean); //if both Mean and StdDev are required this is faster
// c := a.StdDev; //this is an alternative.
See Also: Matrix.Mean

Indexed: Double StdDev(Int32 Index, Int32 Len)

Returns the standard deviation of calling object elements [Index]..[Index+Len-1].

#NameTypeDescription
1IndexInt32start index
2LenInt32element count

Returns: Double

Remarks:

An exception is raised if calling object Dew.Math.Matrix.Complex property is true or if array borders are overrun/underrun.

Overload 2: TCplx StdDev(TCplx AMean)

Returns the standard deviation of all calling object complex elements.

#NameTypeDescription
1AMeanTCplxpre-computed mean

Returns: TCplx (complex)

Remarks:

The average of all calling object elements must be passed as a AMean parameter. An exception is raised if calling object Dew.Math.Matrix.Complex property is false.

Indexed: TCplx StdDev(TCplx AMean, Int32 Index, Int32 Len)

Returns the standard deviation of calling object complex elements [Index]..[Index+Len-1].

#NameTypeDescription
1AMeanTCplxpre-computed mean
2IndexInt32start index
3LenInt32element count

Returns: TCplx (complex)

Remarks:

The average of all calling object elements must be passed as a AMean parameter. An exception is raised if calling object Dew.Math.Matrix.Complex property is false or if array borders are overrun/underrun.

Overload 3: Double StdDev(Double AMean)

Returns the standard deviation of all calling object elements.

#NameTypeDescription
1AMeanDoublepre-computed mean

Returns: Double

Remarks:

The average of all calling object elements must be passed as a AMean parameter. An exception is raised if calling object Dew.Math.Matrix.Complex property is true.

Indexed: Double StdDev(Double AMean, Int32 Index, Int32 Len)

Returns the standard deviation of calling object elements [Index]..[Index+Len-1].

#NameTypeDescription
1AMeanDoublepre-computed mean
2IndexInt32start index
3LenInt32element count

Returns: Double

Remarks:

The average of the coresponding elements must be passed as a parameter. An exception is raised if calling object Dew.Math.Matrix.Complex property is true or if array borders are overrun/underrun.