Jump to content

Component: Standard Deviation (Calculation)

From Flowcode Help
Author MatrixTSL
Version 1.0
Category Calculation


Standard Deviation component

A set of functions used to calculate the mean and standard deviation on a set of data samples.

Component Source Code

Please click here to download the component source project: FC_Comp_Source_StandardDeviation.fcfx

Please click here to view the component source code (Beta): FC_Comp_Source_StandardDeviation.fcfx

Detailed description

No detailed description exists yet for this component

Examples

No additional examples







Macro reference

AddSample

AddSample
Adds a sample to the first in first out sample buffer. 
- FLOAT Sample
Value to add into the FIFO buffer 
- VOID Return


GetDeviation

GetDeviation
Gets the standard deviation of the values in the first in first out buffer 
- FLOAT Return


GetMean

GetMean
Gets the mean of the values in the first in first out buffer 
- FLOAT Return


InitialiseFIFO

InitialiseFIFO
initialises the first in first out buffer values to 0 
- VOID Return


SetSampleCount

SetSampleCount
Sets the number of samples when using the variable sample count type. 
- UINT SampleCount
 
- VOID Return


Property reference

Properties
Sample Count Type
Controls if the number of samples to determine the mean and deviation are fixed or variable, Fixed has some additional optimisations when adding samples but variable allows flexibility. The sample count for variable samples defaults to the max count and can be set using the SetSampleCount macro. 
Number of Samples
Fixed number of samples used to calculate the mean and deviation. Samples are first in first out so the newest sample will replace the oldest. 
Initial Sample Value
Sets the initial value of each sample when initialising the FIFO.