GetAverage [Single]


Function

Gets the average value.

 

Format

Ret = dncStat1.GetAverage(InData , OutData )

 

Parameters

InData [ C#: float[] ] [ VB.NET: Single() ]
Specifies the array that stores the data to be calculated.

 

OutData [ C#: out float ] [ VB.NET: Single ]
Specifies a variable to store the calculation result.

 

Return value

Ret [ C#: int ] [ VB.NET: Integer ]

Value

Description

0

Normality completion

510001

The input parameter is invalid. Check the parameter contents.

Other errors (see: Error code details)

 

Remarks

Gets the average value.

 

Example

Calculates the average value of triangular wave data with amplitude -10.0 to +10.0.

C#

int    Ret;

float[]  InData = new float[4];
float OutData;

InData[0] = 0.0;
InData[1] = 10.0;
InData[2] = -10.0;

InData[3] = 0.0;


ret = dncStat1.GetAverage(InData, out OutData);

 

VB.NET

Dim Ret As Integer
Dim InData(3) As Single
Dim OutData As Single


InData(0) = 0.0;
InData(1) = 10.0;
InData(2) = -10.0;

InData(3) = 0.0;

Ret = dncStat1.GetAverage(InData, OutData)