Jump to content

Component: Standard Deviation (Calculation): Difference between revisions

From Flowcode Help
m Text replacement - "class="wikitable" style="width:60%; background-color:#FFFFFF;"" to "class="mtx-class-macrotable wikitable""
m Text replacement - "width="90%" style="background-color:#D8C9D8; color:#4B008D;"" to "width="90%" class="mtx-class-macrohead""
 
(2 intermediate revisions by the same user not shown)
Line 74: Line 74:
{| class="mtx-class-macrotable wikitable"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''AddSample'''
| width="90%" class="mtx-class-macrohead" | '''AddSample'''
|-
|-
| colspan="2" | Adds a sample to the first in first out sample buffer. 
| colspan="2" | Adds a sample to the first in first out sample buffer. 
Line 93: Line 93:
{| class="mtx-class-macrotable wikitable"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetDeviation'''
| width="90%" class="mtx-class-macrohead" | '''GetDeviation'''
|-
|-
| colspan="2" | Gets the standard deviation of the values in the first in first out buffer 
| colspan="2" | Gets the standard deviation of the values in the first in first out buffer 
Line 107: Line 107:
{| class="mtx-class-macrotable wikitable"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetMean'''
| width="90%" class="mtx-class-macrohead" | '''GetMean'''
|-
|-
| colspan="2" | Gets the mean of the values in the first in first out buffer 
| colspan="2" | Gets the mean of the values in the first in first out buffer 
Line 121: Line 121:
{| class="mtx-class-macrotable wikitable"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''InitialiseFIFO'''
| width="90%" class="mtx-class-macrohead" | '''InitialiseFIFO'''
|-
|-
| colspan="2" | initialises the first in first out buffer values to 0 
| colspan="2" | initialises the first in first out buffer values to 0 
Line 135: Line 135:
{| class="mtx-class-macrotable wikitable"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetSampleCount'''
| width="90%" class="mtx-class-macrohead" | '''SetSampleCount'''
|-
|-
| colspan="2" | Sets the number of samples when using the variable sample count type. 
| colspan="2" | Sets the number of samples when using the variable sample count type. 
Line 155: Line 155:
{| class="mtx-class-macrotable wikitable"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-prop-icon.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''  
| width="90%" class="mtx-class-macrohead" | '''Properties'''  
|-
|-
|-
|-

Latest revision as of 14:23, 13 July 2026

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.