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: cifti_diminfo_make_scalars.m
    path of file: ./repos/brainSurfer/scripts/HCP/cifti
    
    the code of the file until where you have to start completion: function outmap = cifti_diminfo_make_scalars(nummaps, namelist, metadatalist)
    %function outmap = cifti_diminfo_make_scalars(nummaps, namelist, metadatalist)
    %   Create a new scalars diminfo struct.
    %
    %   Only the nummaps argument is required.
    %   The namelist argument, if provided, may be a char vector if nummaps = 1,
    %   or a cell vector of char vectors.
    %   The metadatalist argument, if provided, must be a cell vector of

    
function outmap = cifti_diminfo_make_scalars(nummaps, namelist, metadatalist)
    %function outmap = cifti_diminfo_make_scalars(nummaps, namelist, metadatalist)
    %   Create a new scalars diminfo struct.
    %
    %   Only the nummaps argument is required.
    %   The namelist argument, if provided, may be a char vector if nummaps = 1,
    %   or a cell vector of char vectors.
    %   The metadatalist argument, if provided, must be a cell vector of
    %   struct vectors with the same structure as the metadata in a cifti struct.
    if ~isscalar(nummaps) || round(nummaps) ~= nummaps || ~isfinite(nummaps) || nummaps < 1
        error('number of maps must be a finite, positive integer')
    end