function varargout = polyval(varargin)
%POLYVAL Evaluate polynomial.
%   Y = POLYVAL(P,X)
%   [Y,DELTA] = POLYVAL(P,X,S)
%   Y = POLYVAL(P,X,[],MU)
%   [Y,DELTA] = POLYVAL(P,X,S,MU)
%   
%   Example:
%   Evaluate the polynomial p(x) = 3x^2+2x+1 at x = 5,7, and 9:
%    
%       p = gpuArray([3 2 1]);
%       polyval(p,[5 7 9])
%   
%   See also POLYVAL, GPUARRAY.


%   Copyright 2014 The MathWorks, Inc.

% try...catch prevents error being reported by internal
try
    [varargout{1:nargout}] = parallel.internal.flowthrough.polyval(varargin{:});
catch ME
    throw(ME);
end
