Bioplib
Protein Structure C Library
|
Calculate mean and standard deviation. More...
Go to the source code of this file.
Functions | |
void | blCalcSD (REAL val, int action, REAL *mean, REAL *SD) |
Calculate mean and standard deviation.
This code is NOT IN THE PUBLIC DOMAIN, but it may be copied according to the conditions laid out in the accompanying file COPYING.DOC.
The code may be modified as required, but any modifications must be documented so that the person responsible can be identified.
The code may not be sold commercially or included as part of a commercial product except as described in the file COPYING.DOC.
This routine calculates the mean and standard deviation from a set of numbers. The routine is called with each value to be sampled and the action required is specified.
#include "MathUtil.h" before using these routines CalcSD(val,action,mean,SD) -------------------------- Input: val int The value to be sampled Input: action short 0: Sample the value 1: Calculate & return mean and SD 2: Clear the sample lists Output: mean *REAL The returned mean Output: SD *REAL The returned standard deviation The output values are only set when action=1
Definition in file CalcSD.c.
[in] | val | The value to be sampled |
[in] | action | 0: Sample the value 1: Calculate & return mean and SD 2: Clear the sample lists |
[out] | mean | The returned mean |
[out] | SD | The returned standard deviation |
Calculate the mean and standard deviation from a set of numbers. The routine is called with each value to be sampled and the action required is specified.
The output values are only set when action=1