SignalCharacteristics:
Filter:
SenseWorld/Classes (extension) | Control

SignalCharacteristics
ExtensionExtension

Calculates properties of a timebased signal

Description

SignalCharacteristics analyses data properties and allows you to display these in a gui.

Class Methods

.new

Create a new instance.

Arguments:

maxsize

Maximum number of samples to calculate the properties of.

Instance Methods

.addValue

Add a value to the data set.

Arguments:

newval

A new value, should be a SimpleNumber

.makeGui

Create a graphical window displaying the signal characteristics

Returns:

a SignalCharacteristicsGui

.maxsize

The maximum number of samples to calculate the characteristics of.

.range

Returns the minimum and maximum value of the data

Returns:

an Array

.mean

The mean value of the data

Returns:

a SimpleNumber

.stdDev

The standard deviation, or (square root of) the variation of the data.

Returns:

a SimpleNumber

.median

The median value of the data

Returns:

a SimpleNumber

.times

The deltatimes between data points

Returns:

an Array

.totalTime

Sum of all the deltatimes.

Returns:

a SimpleNumber

.lastTime

The last time a data point was added.

Returns:

a SimpleNumber

.data

The data values that have been gathered

Returns:

an Array

.calcResolution

Calculate the resolution of the data, this sets resdata, stepdata and timeresdata.

.resdata

Sorted set of the data values; this is used to calculate the resolution of the data.

Returns:

an Array

.stepdata

The difference between the data values (differentiated array of resdata).

Returns:

an Array

.timeresdata

Sorted set of the delta time values.

Returns:

an Array

Examples