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: wepoch2file.m
    path of file: ./repos/erplab/functions
    
    the code of the file until where you have to start completion: % UNDER CONSTRUCTION...
%
% 
% Write epoch indices into a file.
%
% wepoch2file(filename, epocharray, acolon, overw)
% 
% filename    - full na
    
function wepoch2file(filename, epocharray, acolon, overw)

if ~iscell(epocharray)
      error('ERPLAB says: epocharray must be a cell array.')
end
if nargin<3
        acolon = 0;
end
if nargin<4
        overw = 0;
end
if overw==0
        fid_values  = fopen(filename, 'a'); %append