function names = dfltobsnames(obsIndices,oneName)
% DFLTOBSNAMES returns default names for observations

% Copyright 2012-2020 The MathWorks, Inc.

prefix = getString(message('stats:dataset:uistrings:DfltObsNamePrefix'));
if nargin < 2 || ~oneName
    if isempty(obsIndices)
        names = cell(0,1);
    else
        names = strcat({prefix},num2str(obsIndices(:),'%-d'));
    end
else
    names = strcat(prefix,num2str(obsIndices,'%-d'));
end
