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: ncdateread_documentation.m
    path of file: ./repos/CDT/cdt/doc
    
    the code of the file until where you have to start completion: %% |ncdateread| documentation 
%
% This function reads in a time variable from a netCDF file into a datetime
% array, assuming that the variable conforms to CF standards with a ' _time
% units_ since _reference time_' units attribute. 
%
% See also <cftime_documentation.html |cftime|>
%
% <CDT_Contents.html Back to Climate Data Tools Contents>
%
%% 
    
function reads in a time variable from a netCDF file into a datetime
% array, assuming that the variable conforms to CF standards with a ' _time
% units_ since _reference time_' units attribute. 
%
% See also <cftime_documentation.html |cftime|>
%
% <CDT_Contents.html Back to Climate Data Tools Contents>
%
%% Syntax
%
%  tdt = ncdateread(file, var)
%  [tdt, tnum, unit, refdate] = ncdateread(file, var)
%
%% Description
%
% |tdt = ncdateread(file, var)| reads values from the time variable |var|
% in the netCDF file (or files) |file| into the datetime array |tdt|,
% assuming that variable uses a standard (i.e. gregorian) calend