udfMeanConv()

Compute the mean and confidence of a signal.

Syntax

udfMeanConv( udfHd, sInput, timeScale, skipTime, attn, sMean, sError ) ;

Type

AcuSolve User-Defined Function Global

Parameters

udfHd
The opaque handle (pointer) which was passed to the user function.
sInput (real)
Input signal at the time t.
timeScale (real)
Time scale of a signal. The formula, 2.0 * dt / timeScale, is used to decide the cut off frequency for low-pass filtering.
skipTime (real)
Time to skip accumulating mean and error in the beginning of iterations.
attn (real)
Attenuation for filtering. The value should be less or equal to unity.
sMean (real)
Returned mean value.
sError (real)
Returned convergence error value. This error value has the same dimension as the original signal. sInput.

Return Value

None

Description

This routine computes the mean and confidence of a signal. For example,
Integer timeScale = 0.1 ;
Integer skipTime = 1.0 ;
Integer attn = 0.1 ;
...
while ( sError > sErrorTole ) {
   ...
   udfMeanConv( udfHd, sInput, timeScale, skipTime, attn, sMean, sError ) ;
   ...
}

Errors

This routine expects a valid udfHd.