function subset = getPredictorSubset(nsub,nx)
% Select a random subset of the predictors

%   Copyright 2017-2019 The MathWorks, Inc

if ~isequal(nsub,'all') && nsub<nx
    subset = randsample(nx, min(nsub,nx));
    subset = sort(subset(:))';
else
    subset = [];
end
end
