function dctEvaluateFunctionArray(fcns)
; %#ok Undocumented
%dctEvaluateFunctionArray 
%
%  dctEvaluateFunctionArray(functionArray)

%  Copyright 2006-2020 The MathWorks, Inc.


% Evaluate the list of functions (assumed to be a cell array of either
% function handles or cell array of callbacks)
for i = 1:numel(fcns)
    thisFcn = fcns{i};
    try
        if iscell(thisFcn)
            dctSchedulerMessage(5, 'dctEvaluateFunctionArray calling: %s with args', ...
                                char(thisFcn{1}));
            feval(thisFcn{1}, thisFcn{2:end});
            dctSchedulerMessage(5, 'dctEvaluateFunctionArray done.');
        else
            dctSchedulerMessage(5, 'dctEvaluateFunctionArray calling: %s.', ...
                                char(thisFcn));
            feval(thisFcn);
            dctSchedulerMessage(5, 'dctEvaluateFunctionArray done.');
        end
    catch e
        dctSchedulerMessage(1, 'dctEvaluateFunctionArray encountered a problem:', e);
        throw(distcomp.ExitException(e, 'dctEvaluateFunctionArray'));
    end
end
