3.7.5.61 Sum

LabTalk Object Type:

Utility

The user should be aware that certain GUI operations may alter these values.

Properties:

Property Access Description
sum.max Read only
numeric
The maximum value in the selected dataset.
sum.mean Read only
numeric
The mean value in the selected dataset.
sum.min Read only
numeric
The minimum value in the selected dataset.
sum.imax Read only
numeric
The row index number of the maximum value in the selected dataset.
sum.imin Read only
numeric
The row index number of the minimum value in the selected dataset.
sum.n Read only
numeric
The number of points in the dataset.
sum.sd Read only
numeric
The standard deviation in the selected dataset.
sum.total Read only
numeric
The sum of all the values in the selected dataset.

Examples:

This script creates a range variable, then uses the sum() function to generate statistics on column B. The associated values are saved in sum object properties. These values are printed to the Script window.

range rr = [Book1]Sheet1!Col(B);
col(C) = sum(rr);
type "max = $(sum.max)";  // max value, col(b)
type "mean = $(sum.mean)"; // mean value, col(b)
type "min = $(sum.min)"; // min value, col(b)
type "n = $(sum.n)";  // number of elements, col(b)
type "sd = $(sum.sd)"; // // std. dev. , col(b)
type "total = $(sum.total)"; //total, col(b)
type "imax = $(sum.imax)";  // row index of max value, col(b)
type "imin = $(sum.imin)";  // row index of min value, col(b)