Generate subsample