box_behnken, a C code which returns a set of sample argument values to be used to analyze the behavior of a function.

Given DIM_NUM parameters, each of which is prescribed to lie between a minimum and maximum range, and a function taking these parameters as arguments, this program returns a table of sets of argument values that may be used to sample the function's behavior.

One sample point is the average. All other sample points are generated by setting a single spatial coordinate to its average value, and all other spatial coordinates to either the minimum or maximum. In this way, 1 + DIM_NUM*2^(DIM_NUM-1) points are generated.


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


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

Related Data and Programs:


halton, a C code which computes elements of a Halton sequence.

hammersley, a C code which computes elements of a Hammersley Quasi Monte Carlo (QMC) sequence, using a simple interface.

latin_random, a C code which computes elements of a Latin Hypercube dataset, choosing points at random.

uniform, a C code which computes elements of a uniform pseudorandom sequence.

van_der_corput, a C code which computes elements of a (1 dimensional) van der Corput sequence.


  1. George Box, Donald Behnken,
    Some new three level designs for the study of quantitative variables,
    Volume 2, pages 455-475, 1960.

Source Code:

Last revised on 10 June 2019.