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: toFunctionOut.m
    path of file: ./repos/chebfun/@chebcolloc1
    
    the code of the file until where you have to start completion: function f = toFunctionOut(disc, values, cutoff)
%TOFUNCTIONOUT   Convert CHEBCOLLOC1 discretization to a CHEBFUN. 
%   TOFUNCTIONIN(DISC, VALUES, CUTOFF) converts the values of a 
%   CHEBCOLLOC1-discretized function to a CHEBFUN. If CUTOFF is
%   specified the resulting CHEBFUN will have length CUTOFF. If DISC.DOMAIN 
%   has breakpoints, the input should have cell arrrays corresponding 
%   to smooth pieces.
%
%   If VALUES is matrix valued, the output is an array-valued CHEBFUN, where
%   each column of the CHEBFUN corresponds to a column of the input.

    
function f = toFunctionOut(disc, values, cutoff)
%TOFUNCTIONOUT   Convert CHEBCOLLOC1 discretization to a CHEBFUN. 
%   TOFUNCTIONIN(DISC, VALUES, CUTOFF) converts the values of a 
%   CHEBCOLLOC1-discretized function to a CHEBFUN. If CUTOFF is
%   specified the resulting CHEBFUN will have length CUTOFF. If DISC.DOMAIN 
%   has breakpoints, the input should have cell arrrays corresponding 
%   to smooth pieces.
%
%   If VALUES is matrix valued, the output is an array-valued CHEBFUN, where
%   each column of the CHEBFUN corresponds to a column of the input.
%
% See also TOVALUES.

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

% Break into one cell per interval. 
if ( disc.numIntervals > 1 )
    values = mat2cell(values, disc.dimension);
else
    values = {values};
end