Component: Standard Deviation (Calculation)

From Flowcode Help
Jump to navigationJump to search
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

Fc9-comp-macro.png AddSample
Adds a sample to the first in first out sample buffer. 
Fc9-f32-icon.png - FLOAT Sample
Value to add into the FIFO buffer 
Fc9-void-icon.png - VOID Return


GetDeviation

Fc9-comp-macro.png GetDeviation
Gets the standard deviation of the values in the first in first out buffer 
Fc9-f32-icon.png - FLOAT Return


GetMean

Fc9-comp-macro.png GetMean
Gets the mean of the values in the first in first out buffer 
Fc9-f32-icon.png - FLOAT Return


InitialiseFIFO

Fc9-comp-macro.png InitialiseFIFO
initialises the first in first out buffer values to 0 
Fc9-void-icon.png - VOID Return


SetSampleCount

Fc9-comp-macro.png SetSampleCount
Sets the number of samples when using the variable sample count type. 
Fc9-u16-icon.png - UINT SampleCount
 
Fc9-void-icon.png - VOID Return


Property reference

Fc9-prop-icon.png Properties
Fc9-type-16-icon.png 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. 
Fc9-type-21-icon.png 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. 
Fc9-type-15-icon.png Initial Sample Value
Sets the initial value of each sample when initialising the FIFO.