MATLAB: draw_sample