Distance-based optimal design
The MATLAB routine for Distance-based optimal design divides a set of samples in two sets (training set and a complementary set). Moreover, it can perform a random selection of an optional external set of samples. Details on the algorithm can be found in the following paper: Marengo-Todeschini algorithm (Chemolab,16,37-44,1992).
If you use this routine, we would appreciate a reference to the following paper:

E. Marengo, R.Todeschini
A new algorithm for optimal, distance-based experimental design.
Chemom.Intell.Lab.Syst., 16 (1992) 37-44

You can freely download the MATLAB module of Distance-based optimal design: download here