Force a Dataset to be a Latin Hypercube

LATINIZE is a FORTRAN90 library which adjusts an M dimensional dataset of N points so that it forms a Latin hypercube.

On output, each row of the table will have the properties that:

  1. the minimum and maximum row values are the same as on input;
  2. the row contains N evenly spaced values between the minimum and maximum.
  3. in each row, the elements retain their ordering.


The computer code and data files described and made available on this web page are distributed under the GNU LGPL license.


LATINIZE is available in a C version and a C++ version and a FORTRAN90 version and a MATLAB version.

Related Data and Programs:

LATIN_CENTER, a FORTRAN90 library which computes a Latin Square by choosing the center of each square.

LATIN_COVER, a FORTRAN90 library which produces N Latin squares which cover an NxN square, or NxN Latin cubes which cover an NxNxN cube.

LATIN_EDGE, a FORTRAN90 library which computes a Latin Square by choosing the edge of each square.

LATIN_RANDOM, a FORTRAN90 library which computes a Latin Square by choosing a random point of each square.

TABLE_LATINIZE, a FORTRAN90 program which allows the user to name the input data file on the command line.


  1. Michael McKay, William Conover, Richard Beckman,
    A Comparison of Three Methods for Selecting Values of Input Variables in the Analysis of Output From a Computer Code,
    Volume 21, pages 239-245, 1979.
  2. Yuki Saka, Max Gunzburger, John Burkardt,
    Latinized, Improved LHS, and CVT Point Sets in Hypercubes,
    International Journal of Numerical Analysis and Modeling,
    Volume 4, Number 3-4, 2007, pages 729-743,

Source Code:

Examples and Tests:

CVT_02_00010 is a set of 10 CVT points in 2D:

CVT_03_00007 is a set of 7 CVT points in 3D:

CVT_03_00056 is a set of 56 CVT points in 3D:

CVT_07_00100 is a set of 100 CVT points in 7D:

List of Routines:

You can go up one level to the FORTRAN90 source codes.

Last revised on 04 February 2012.