DataLab is a compact statistics package aiming at exploratory data analysis. Please visit the DataLab Web site for more information....


IsMonotone

Declaration: function IsMonotone (var Data: TDoubleArray): boolean;
The function IsMonotone checks whether the values in the array Data form a monotonic series or not. A monotonic series contains consecutive values which all exhibit either positive or negative differences to their respective predecessor (zero differences are allowed).

Please note that the array has to have a minimum length of three elements, if the array is shorter the function returns always TRUE.