function varargout = polyfit(varargin)
%POLYFIT Convert roots to polynomial.
%   P = POLYFIT(X,Y,N)
%   [P,S] = POLYFIT(X,Y,N)
%   [P,S,MU] = POLYFIT(X,Y,N)
%   
%   64-bit integers are not supported for input N.
%   
%   Example:
%    
%       x = gpuArray.linspace(0, 3*pi, 1000);
%       y = sin(x);
%       p = polyfit(x, y, 5);
%       plot(x, y, 'r', x, polyval(p,x), 'b');
%   
%   See also POLYFIT, SIN, POLYVAL, GPUARRAY, GPUARRAY.LINSPACE.


%   Copyright 2014-2017 The MathWorks, Inc.

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