The outage for Sunday 24th November has been cancelled.
Bioplib
Protein Structure C Library
 All Data Structures Files Functions Variables Typedefs Macros Pages
Functions
CalcSD.c File Reference

Calculate mean and standard deviation. More...

#include <math.h>
#include "MathType.h"

Go to the source code of this file.

Functions

void blCalcSD (REAL val, int action, REAL *mean, REAL *SD)
 

Detailed Description

Calculate mean and standard deviation.

Version
V1.4
Date
07.07.14
Author
Dr. Andrew C. R. Martin
Institute of Structural & Molecular Biology, University College London, Gower Street, London. WC1E 6BT.
andre.nosp@m.w@bi.nosp@m.oinf..nosp@m.org..nosp@m.uk andre.nosp@m.w.ma.nosp@m.rtin@.nosp@m.ucl..nosp@m.ac.uk

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.

Description:

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.

Usage:

  #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

Revision History:

Definition in file CalcSD.c.

Function Documentation

void blCalcSD ( REAL  val,
int  action,
REAL mean,
REAL SD 
)
Parameters
[in]valThe value to be sampled
[in]action0: Sample the value 1: Calculate & return mean and SD 2: Clear the sample lists
[out]meanThe returned mean
[out]SDThe 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

  • 30.03.90 Original By: ACRM
  • 17.06.93 Modified for book
  • 22.06.94 Fixed for 0 values supplied
  • 07.07.14 Use bl prefix for functions By: CTP

Definition at line 124 of file CalcSD.c.