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: nex_cont.m
    path of file: ./repos/EEGapp/EEGapp/custom_stuff/Chronux/chronux_2_12/dataio/HowToReadNexFilesInMatlab
    
    the code of the file until where you have to start completion: function [adfreq, n, ts, fn, d] = nex_cont(filename, varname)
% nex_cont(filename, varname): Read continuous variable from a .nex file
%
% [adfreq, n, ts, fn, d] = nex_cont(filename, varname)
%
% INPUT:
%   filename - if empty string, will use File Open dialog
%   varname - variable name
%
%           continuous (a/d) data come in fragments. Each fragment has a timestamp
%           and a number of a/d data points. The timestamp corresponds to
%           the time of recording of the first a/d value in this fragment.
%           All the data values stored in the vector d. 
% OUTPUT:
%   n - total number of data points 
%   ts - array of fragment timestamps (one timestamp for fragment, in seconds)
%   fn - number of data points in each fragment
%   d - array of a/d values (in millivolts)


    
function [adfreq, n, ts, fn, d] = nex_cont(filename, varname)
% nex_cont(filename, varname): Read continuous variable from a .nex file
%
% [adfreq, n, ts, fn, d] = nex_cont(filename, varname)
%
% INPUT:
%   filename - if empty string, will use File Open dialog
%   varname - variable name
%
%           continuous (a/d) data come in fragments. Each fragment has a timestamp
%           and a number of a/d data points. The timestamp corresponds to
%           the time of recording of the first a/d value in this fragment.
%           All the data values stored in the vector d. 
% OUTPUT:
%   n - total number of data points 
%   ts - array of fragment timestamps (one timestamp for fragment, in seconds)
%   fn - number of data points in each fragment
%   d - array of a/d values (in millivolts)

n = 0;
adfreq = 0;
ts = 0;
fn = 0;
d = 0;

if(nargin ~= 2)
   disp('2 input arguments are required')
   return
end