Table Functions


Table functions do math and other operations on numeric data stored in a Lua table used as an array. These functions are global so they can be used without creating any class object. All functions begin with a capital "T" followed by a capitalized name, like TSort or TMean.

These commands work on Lua tables as well as objects of the following classes: CImage, CArray, and CMatrix. Collectively, these are referred to as "data collections" in the descriptions below.

Table Functions

TGaussDev

Creates a table of Gaussian random deviates and returns the table.

THist

Creates a histogram of data and returns it as a table.

TList

Lists the contents of a table, including the keys.

TMax

Returns the maximum value of a data collection.

TMin

Returns the minimum value of a data collection.

TMean

Returns the mean and standard deviation of a data collection.

TMedian

Returns the median value of a data collection.

TRand

Creates a table of uniform random deviates and returns the table.

TReverse

Reverses the order of values in a data collection and returns the collection.

TSdev

Returns the standard deviation of a data collection.

TSeries

Creates a table containing a series of uniformly spaced values and returns the table.

TSort

Sorts 1 to 3 tables or CImage objects into ascending order, optionally using a sorting key.

TSortR

Sorts a data collection into ascending ("reverse") order and returns the collection.

TSum

Returns the sum of values in a data collection.

Related Topics

Contents

CStats Class

CHistogram class

CImage Class

CArray Class

CMatrix Class