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....



StdDevOfLayersToMatrix


Unit: SDL_matrix
Class: TMat4D
Declaration: [1] procedure StdDevOfLayersToMatrix (DestMat: TMatrix; LowCol, HighCol, LowRow, HighRow, LowLayer, HighLayer, LowTimeSlot, HighTimeSlot: integer);
[2] procedure StdDevOfLayersToMatrix (DestMat: TMatrix; LowCol, HighCol, LowRow, HighRow, LowLayer, HighLayer, LowTimeSlot, HighTimeSlot, NThreads: integer);

The method StdDevOfLayersToMatrix calculates the standard deviation of several two-dimensional submatrices and copies the result into the matrix DestMat. The range of each submatrix is specified by the parameters LowCol, HighCol, LowRow, and HighRow. The processed submatrices are specified by the parameters LowLayer, HighLayer, LowTimeSlot, and HighTimeSlot.

As a shortcut, setting both the Low.... and High.... parameters to zero is equal to processing the entire range of available columns/rows/layers/time slots.

The destination matrix DestMat is automatically resized to accomodate to the number of processed data cells.

StdDevOfLayersToMatrix increments the global variable ProcStat in 100 steps and calls the feedback routine MathFeedBackProc in order to allow feedback to the user during time consuming calculations.

The function StdDevOfLayersToMatrix is available in two overloaded versions: version [1] automatically switches to multiprocessing if more than one CPU core is available. This speeds up calculations by a factor which is roughly proportional to the number of available hardware codes (supported only for Delphi/C++Builder XE4 or higher). Version [2] allows you to control the number of cores to be used for the calculation by setting the parameter NThreads.

Example: The statement StdDevOfLayersToMatrix (SMat,2,4,2,7,2,2,0,0); calculates the standard deviation of all matrix elements in the columns 2..4 and rows 2..7 for layer 2 in all time slots and stores the result in matrix SMat.



Last Update: 2023-Feb-06