Component: Standard Deviation (Storage)
Author | MatrixTSL |
Version | 1.0 (Release) |
Category | Storage |
Contents
Standard Deviation component
A set of functions used to calculate the mean and standard deviation on a set of data samples.
Examples
No additional examples
Downloadable macro reference
InitialiseFIFO
initialises the first in first out buffer values to 0
Parameters
- This macro has no parameters
Return value
- This call does not return a value
AddSample
Adds a sample to the first in first out sample buffer.
Parameters
- FLOAT Sample
- Value to add into the FIFO buffer
Return value
- This call does not return a value
GetDeviation
Gets the standard deviation of the values in the first in first out buffer
Parameters
- This macro has no parameters
Return value
GetMean
Gets the mean of the values in the first in first out buffer
Parameters
- This macro has no parameters
Return value
SetSampleCount
Sets the number of samples when using the variable sample count type.
Parameters
- UINT SampleCount
Return value
- This call does not return a value
Simulation macro reference
This component does not contain any simulation macros
Property reference
Sample Count Type
This property is of type Fixed list of ints and can be referenced with the variable name SampCountType.
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
This property is of type Unsigned integer and can be referenced with the variable name NumSamples.
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
This property is of type Floating point and can be referenced with the variable name InitialSampleValue.
Sets the initial value of each sample when initialising the FIFO.