function t = parforfinal(varargin)
%PARFORFINAL                     Private utility function for parallel

%PARFORFINAL Final value for PARFOR on each processor.

%   Copyright 2006-2021 The MathWorks, Inc.

if parfor_depth == 1
    c = distributedutil.drangeColon(varargin{:});
    if isempty(c)
        t = c;
    else
        t = c(end);
    end
else
    t = varargin{end};
end

