halton_dataset 07-Jul-2004 17:43:23 HALTON_DATASET (MATLAB version) Generate a Halton dataset. This program is meant to be used interactively. It is also possible to prepare a simple input file beforehand and use it in batch mode. The program requests input values from the user: * NDIM, the spatial dimension, * N, the number of points to generate, * STEP, the index of the first subsequence element. * SEED(1:NDIM), the Halton sequence element corresponding to STEP = 0 * LEAP(1:NDIM), the successive jumps in the Halton sequence. * BASE(1:M), the Halton bases, usually distinct primes. The program generates the data, writes it to the file halton_NDIM_N.txt where "NDIM" and "N" are the numeric values specified by the user, and then asks the user for more input. To indicate that no further computations are desired, it is enough to input a nonsensical value, such as -1. * * * Ready to generate a new dataset: * * NDIM is the spatial dimension. Any value less than 1 terminates execution. Enter NDIM: 2 User input NDIM = 2 N is the number of points. Any value less than 1 terminates execution. Enter N: 10 User input N = 10 STEP is the index of the first subsequence element. Any value less than 0 terminates execution. Enter STEP: 0 User input STEP = 0 SEED(1:NDIM) is the starting element index for each coordinate. [0, 0, ..., 0] is a common choice. (Any value less than 0 terminates execution.) Enter SEED(1:NDIM): [1,1] SEED: 1 1 LEAP(1:NDIM) is the leaping multiplier for each coordinate. [1, 1, ..., 1] is a common choice. Another is any prime bigger than all the bases. (Any value less than 1 terminates execution.) Enter LEAP(1:NDIM): [1,1] LEAP: 1 1 BASE(1:NDIM) is the base for each coordinate, usually distinct primes. [2, 3, 5, 7, 11, 13, ... ] is a common choice. (Any value less than 2 terminates execution.) Enter BASE: [2,3] BASE: 2 3 The Halton data was written to the file "halton_2_10.txt". * * * Ready to generate a new dataset: * * NDIM is the spatial dimension. Any value less than 1 terminates execution. Enter NDIM: 3 User input NDIM = 3 N is the number of points. Any value less than 1 terminates execution. Enter N: 100 User input N = 100 STEP is the index of the first subsequence element. Any value less than 0 terminates execution. Enter STEP: 0 User input STEP = 0 SEED(1:NDIM) is the starting element index for each coordinate. [0, 0, ..., 0] is a common choice. (Any value less than 0 terminates execution.) Enter SEED(1:NDIM): [0,1,2] SEED: 0 1 2 LEAP(1:NDIM) is the leaping multiplier for each coordinate. [1, 1, ..., 1] is a common choice. Another is any prime bigger than all the bases. (Any value less than 1 terminates execution.) Enter LEAP(1:NDIM): [1,2,3] LEAP: 1 2 3 BASE(1:NDIM) is the base for each coordinate, usually distinct primes. [2, 3, 5, 7, 11, 13, ... ] is a common choice. (Any value less than 2 terminates execution.) Enter BASE: [5,3,7] BASE: 5 3 7 The Halton data was written to the file "halton_3_100.txt". * * * Ready to generate a new dataset: * * NDIM is the spatial dimension. Any value less than 1 terminates execution. Enter NDIM: 7 User input NDIM = 7 N is the number of points. Any value less than 1 terminates execution. Enter N: 1000 User input N = 1000 STEP is the index of the first subsequence element. Any value less than 0 terminates execution. Enter STEP: 0 User input STEP = 0 SEED(1:NDIM) is the starting element index for each coordinate. [0, 0, ..., 0] is a common choice. (Any value less than 0 terminates execution.) Enter SEED(1:NDIM): [0,0,0,0,0,0,0] SEED: 0 0 0 0 0 0 0 LEAP(1:NDIM) is the leaping multiplier for each coordinate. [1, 1, ..., 1] is a common choice. Another is any prime bigger than all the bases. (Any value less than 1 terminates execution.) Enter LEAP(1:NDIM): [1,1,1,1,1,1,1] LEAP: 1 1 1 1 1 1 1 BASE(1:NDIM) is the base for each coordinate, usually distinct primes. [2, 3, 5, 7, 11, 13, ... ] is a common choice. (Any value less than 2 terminates execution.) Enter BASE: [2,3,4,5,6,7,8] BASE: 2 3 4 5 6 7 8 The Halton data was written to the file "halton_7_1000.txt". * * * Ready to generate a new dataset: * * NDIM is the spatial dimension. Any value less than 1 terminates execution. Enter NDIM: -1 User input NDIM = -1 HALTON_DATASET The input value of NDIM = -1 is interpreted as a request for termination. Normal end of execution. 07-Jul-2004 17:44:59