Matlab/Octave code to experiment several sampling methods