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: ReadFASTbinary.m
    path of file: ./repos/Wind-Turbine-Control/FAST_v7.02.00d-bjj/CertTest
    
    the code of the file until where you have to start completion: function [Channels, ChanName, ChanUnit, FileID] = ReadFASTbinary(FileName)

    
function [Channels, ChanName, ChanUnit, FileID] = ReadFASTbinary(FileName)
%[Channels, ChannelNames, ChannelUnits] = ReadFASTbinary(FileName)
% Author: Bonnie Jonkman, National Renewable Energy Laboratory
% (c) 2012, National Renewable Energy Laboratory
%
%  Edited for FAST v7.02.00b-bjj  22-Oct-2012
%
% Input:
%  FileName      - string: contains file name to open
%
% Output:
%  Channels      - 2-D array: dimension 1 is time, dimension 2 is channel 
%  ChanName      - cell array containing names of output channels
%  ChanUnit      - cell array containing unit names of output channels
%  FileID        - constant that determines if the time is stored in the
%                  output, indicating possible non-constant time step
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
LenName = 10;  % number of characters per channel name
LenUnit = 10;  % number of characters per unit name

FileFmtID = struct( 'WithTime',   1, ...               % File identifiers used in FAST
                    'WithoutTime',2 );

fid  = fopen( FileName );
if fid > 0
    %----------------------------        
    % get the header information
    %----------------------------
    
    FileID       = fread( fid, 1, 'int16');             % FAST output file format, INT(2)

    NumOutChans  = fread( fid, 1, 'int32');             % The number of output channels, INT(4)
    NT           = fread( fid, 1, 'int32');             % The number of time steps, INT(4)

    if FileID == FileFmtID.WithTime
        TimeScl  = fread( fid, 1, 'float64');           % The time slopes for scaling, REAL(8)
        TimeOff  = fread( fid, 1, 'float64');           % The time offsets for scaling, REAL(8)
    else
        TimeOut1 = fread( fid, 1, 'float64');           % The first time in the time series, REAL(8)
        TimeIncr = fread( fid, 1, 'float64');           % The time increment, REAL(8)
    end