The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....



SumOfSquaredNumCells


Unit:SDL_datatable
Class: TDataTable
Declaration: function SumOfSquaredNumCells (LowCol,LowRow,HighCol,HighRow: integer; var NumData: integer): double;

The function SumOfSquaredNumCells adds the squares of all data cells within a specified range of cells which are neither marked as csNAN, nor as csUndefined and which belong to either interval or ratio scaled variables (that is, all cells which contain "real" numbers). The range of the data table elements to be summed is determined by the parameters LowRow, LowCol, HighRow, and HighCol. If any of these parameters receives an invalid value, this value is automatically adjusted to the nearest boundary value (either 1 or NrOfColumns / NrOfRows).

The function returns the sum of the squared numeric data cells within the specified range. The variable parameter NumData returns the number of data points used for the calculation (i.e. the number of numeric data cells within the specified range).

Hint: Setting both the low and high parameter of a dimension (i.e. LowCol and HighCol) to zero values forces the method to use all elements of that dimension.



Last Update: 2023-Dec-14