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: feval.m
    path of file: ./repos/chebfun/@chebfun3t
    
    the code of the file until where you have to start completion: function out = feval(f, xx, yy, zz)
%FEVAL   Evaluate a CHEBFUN3T object.
%    The workflow of this code is as follows:
%   1) Check the domain of f. If it is not the unit cube, then map the
%   points to the unit cube [-1, +1]^3. This should be done so that
%   Clenshaw's algorithm can be applied.
%
%   2) Check whether given points are vectors or tensors (Matrix case is 
%   rarely used and if we decided to add this at some point, we can copy 
%   from chebfun3/feval). If the input points are tensors generated by 
%   meshgrid or ndgrid, first determine the generating "vector" in each of 
%   them. Further operations should be applied only to these vectors and 
%   not to the full tensors (unless we have fully unstructured tensors of 
%   points).
% 
%   3) Call 1D Clenshaw's algorithm (usually only on the vectors because of 
%   Step 2).
%
%   4) Apply tensor-matrix contractions to get the output.
%
%   For a tensor of coefficients of size M*N*P and 3 vectors xeval, yeval, 
%   and zeval of size n*1, the complexity of this code is O (n*M*N*P).
%   Steps 1 and 2 can be reordered so that mapping is applied not to the
%   whole tensor, but to the generating vectors.
%
% See also CHEBFUN/FEVAL.

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

dom = f.domain;

%% Map all the points to [-1, +1]:
% If any of the 3 domains are not [-1, +1], then we need to map points in
% the corresponding domain [a, b] to [-1, +1] so that Clenshaw's algorithm 
% can be accurately applied. We are naiively following the work-flow 1D 
% Chebfun classes have.

% Map x coordinate of points to [-1, 1]:

    
function out = feval(f, xx, yy, zz)
%FEVAL   Evaluate a CHEBFUN3T object.
%    The workflow of this code is as follows:
%   1) Check the domain of f. If it is not the unit cube, then map the
%   points to the unit cube [-1, +1]^3. This should be done so that
%   Clenshaw's algorithm can be applied.
%
%   2) Check whether given points are vectors or tensors (Matrix case is 
%   rarely used and if we decided to add this at some point, we can copy 
%   from chebfun3/feval). If the input points are tensors generated by 
%   meshgrid or ndgrid, first determine the generating "vector" in each of 
%   them. Further operations should be applied only to these vectors and 
%   not to the full tensors (unless we have fully unstructured tensors of 
%   points).
% 
%   3) Call 1D Clenshaw's algorithm (usually only on the vectors because of 
%   Step 2).
%
%   4) Apply tensor-matrix contractions to get the output.
%
%   For a tensor of coefficients of size M*N*P and 3 vectors xeval, yeval, 
%   and zeval of size n*1, the complexity of this code is O (n*M*N*P).
%   Steps 1 and 2 can be reordered so that mapping is applied not to the
%   whole tensor, but to the generating vectors.
%
% See also CHEBFUN/FEVAL.

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

dom = f.domain;

%% Map all the points to [-1, +1]:
% If any of the 3 domains are not [-1, +1], then we need to map points in
% the corresponding domain [a, b] to [-1, +1] so that Clenshaw's algorithm 
% can be accurately applied. We are naiively following the work-flow 1D 
% Chebfun classes have.

% Map x coordinate of points to [-1, 1]:
if ( ~all(dom(1:2) == [-1, 1]) )
    % Create the linear map required in the 1st variable.
    linMap1 = bndfun.createMap(dom(1:2));
    % We just need the inverse part of the linMap1.
    xx = linMap1.Inv(xx);
end