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: plus.m
    path of file: ./repos/chebfun/@trigtech
    
    the code of the file until where you have to start completion: function f = plus(f, g)
%+   Addition of two TRIGTECH objects.
%   F + G adds F and G, where F and G may be TRIGTECH objects or scalars.
%
%   If F is an array-valued TRIGTECH, then F + C is supported if C is a row
%   vector of doubles with the same number of columns as F.
%
% See also MINUS, UPLUS.

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

if ( isempty(f) || isempty(g) ) % TRIGTECH + [] = [].
    
    f = [];
    
elseif ( isa(g, 'double') ) % TRIGTECH + double.
    
    % Update values (use bsxfun() to handle the case in which g is a vector

    
function f = plus(f, g)
%+   Addition of two TRIGTECH objects.
%   F + G adds F and G, where F and G may be TRIGTECH objects or scalars.
%
%   If F is an array-valued TRIGTECH, then F + C is supported if C is a row
%   vector of doubles with the same number of columns as F.
%
% See also MINUS, UPLUS.

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

if ( isempty(f) || isempty(g) ) % TRIGTECH + [] = [].
    
    f = [];
    
elseif ( isa(g, 'double') ) % TRIGTECH + double.
    
    % Update values (use bsxfun() to handle the case in which g is a vector
    % and f is an array-valued TRIGTECH):
    f.values = bsxfun(@plus, f.values, g);
    
    % Update coeffs:
    if ( (size(g, 2) > 1) && (size(f.coeffs, 2) == 1) )
        % Perform singleton expansion of f:
        f.coeffs = repmat(f.coeffs, 1, size(g, 2));
    end