|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....|
|Home MathPack OpenArrays Procedures and Functions FrequDistOfArray|
|See also: Histogram (Matrix), Histogram (Vector)|
The function FrequDistOfArray calculates the frequency distribution of the values contained in the array Data. The parameters LoX, LoY, HiX and HiY control the region of the data array to be used for the analysis (0-based array index values). Setting all four values to zero is equivalent to using the entire array. In version  you may restrict the region which is used for the calculations by using the Mask parameter. Pixels whose corresponding Mask value is TRUE are omitted from the calculations.
The parameters FirstBin and LastBin specify the left (lower) boundary of the first and the last bin of the frequency distribution. The parameter BinWidth defines the width of the bins. A particular bin of the histogram spans the range from FirstBin + i*BinWidth to FirstBin + (i+1)*BinWidth, with i being the bin number (starting from zero). The integer array FrequDist contains the counts of the distribution. FrequDist is automatically resized. Values which don't fit into the histogram (i.e. values which are less than FirstBin, or greater than LastBin + BinWidth) are counted in the variable parameters UnderFlow and OverFlow. The variable parameter MaxCnt returns the maximum count over all bins.
The function returns the following error codes:
0 ... everything is OK