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: channel_writer.m
    path of file: ./repos/PsPM/src/Import/labchart/adi/+adi/+binary
    
    the code of the file until where you have to start completion: classdef (Hidden) channel_writer
    %
    %   Class:
    %   adi.channel_writer
    %
    %   This class facilities writing a channel to the binary file format.
    %   More details can be found in adi.binary_file_writer
    %
    %   See Also:
    %   adi.binary_file_writer
    
    
    %{
        Each channel header has the following format:
        type name description
        char Title[32] channel title
        char Units[32] units name
        double scale
    
function writeHeader(obj,fid)
            %pass
            
            temp_title = zeros(1,32,'uint8');
            temp_units = zeros(1,32,'uint8');
            temp_title(1:length(obj.name)) = uint8(obj.name);
            temp_units(1:length(obj.units)) = uint8(obj.units);
            
            fwrite(fid,temp_title,'*char');
            fwrite(fid,temp_units,'*char');
            fwrite(fid,obj.scale,'double');
            fwrite(fid,obj.offset,'double');
            %Range high and low ... - not currently used
            fwrite(fid,Inf,'double');
            fwrite(fid,-Inf,'double');
        end