You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: trigpoly.m
    path of file: ./repos/chebfun
    
    the code of the file until where you have to start completion: function f = trigpoly(n, d)
%TRIGPOLY   Trigonometric polynomial in complex exponential form.
%   F = TRIGPOLY(N) returns the degree N trigonometric polynomial exp(1i*pi*N*x) 
%   on [-1,1], where N may be a vector of integers.
%
%   F = TRIGPOLY(N, D), where D is an interval or a domain, gives the same
%   result scaled accordingly.
%
% See also CHEBPOLY, LEGPOLY, and TRIGPTS.

    
function f = trigpoly(n, d)
%TRIGPOLY   Trigonometric polynomial in complex exponential form.
%   F = TRIGPOLY(N) returns the degree N trigonometric polynomial exp(1i*pi*N*x) 
%   on [-1,1], where N may be a vector of integers.
%
%   F = TRIGPOLY(N, D), where D is an interval or a domain, gives the same
%   result scaled accordingly.
%
% See also CHEBPOLY, LEGPOLY, and TRIGPTS.

% Copyright 2017 by The University of Oxford and The Chebfun Developers. 
% See http://www.chebfun.org/ for Chebfun information. 

% Parse input
if ( any(mod(n, 1) ~= 0) )
    error('CHEBFUN:trigpoly:integern', ...
    'The first argument must be a vector of integers.');
end