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: hermpoly.m
    path of file: ./repos/chebfun
    
    the code of the file until where you have to start completion: function H = hermpoly(n, type)
%HERMPOLY   Hermite polynomial of degree n.
%   H = HERMPOLY(N) returns the chebfun corresponding to the 'physicist'-type
%   Hermite polynomials H_N(x) on [-inf,inf] (orthogonal with respect to the
%   weight exp(-x.^2)). N may be a vector of positive integers.
%
%   H = HERMPOLY(N, 'PROB') normalises instead by the probablist's definition
%   (with weight exp(-x.^2/2)), which gives rise to monic polynomials.
%

    
function H = hermpoly(n, type)
%HERMPOLY   Hermite polynomial of degree n.
%   H = HERMPOLY(N) returns the chebfun corresponding to the 'physicist'-type
%   Hermite polynomials H_N(x) on [-inf,inf] (orthogonal with respect to the
%   weight exp(-x.^2)). N may be a vector of positive integers.
%
%   H = HERMPOLY(N, 'PROB') normalises instead by the probablist's definition
%   (with weight exp(-x.^2/2)), which gives rise to monic polynomials.
%
%   Note, this is currently just a toy to play with the construction of Hermite
%   polynomials using a combination of Chebfun's barycentric, mapping, and
%   'blowup' technologies.
% See also CHEBPOLY, LEGPOLY, JACPOLY, and LAGPOLY.

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

if ( nargin == 1 )
    % By default we take the physicist's definition:
    type = 'phys';
end