hist_stat_buffer

hist_stat_buffer — generates summary statistics on Y-values.

Syntax

hist_stat_buffer (buffer)
    

Parameters

buffer

A binary buffer of X-Y pairs of doubles, created by a call to hist_buffer_id_read.

Returns

(count min max mean stddev)

Description

This function generates a set of summary statistics on the Y-value data in a buffer: minimum value, maximum value, mean, and standard deviation. The X-value data is ignored. The buffer data would typically represent the result of a query for all values of a specific history (previously retrieved with the Cascade Historian hist_read_buffer function). The summary statistics can then be used to provide some idea of the nature of the data, or could be used to automatically scale the display of the data.

This function corresponds to the Cogent C API function HI_StatBuffer.

Example

stats = hist_stat_buffer (buf);
countbuf = car(stats); stats = cdr(stats);
minbuf = car(stats); maxbuf = cadr(stats); stats = cddr(stats);
meanbuf = car(stats);