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: ft_headmodeltype.m
    path of file: ./repos/spm/external/fieldtrip/fileio/private
    
    the code of the file until where you have to start completion: function [type] = ft_headmodeltype(headmodel, desired)

% FT_HEADMODELTYPE determines the type of volume conduction model of the head
%
% Use as
%   [type] = ft_headmodeltype(headmodel)
% to get a string describing the type, or
%   [flag] = ft_headmodeltype(headmodel, desired)
% to get a boolean value.
%

    
function [type] = ft_headmodeltype(headmodel, desired)

% FT_HEADMODELTYPE determines the type of volume conduction model of the head
%
% Use as
%   [type] = ft_headmodeltype(headmodel)
% to get a string describing the type, or
%   [flag] = ft_headmodeltype(headmodel, desired)
% to get a boolean value.
%
% For EEG the following volume conduction models are recognized
%   singlesphere       analytical single sphere model
%   concentricspheres  analytical concentric sphere model with up to 4 spheres
%   halfspace          infinite homogenous medium on one side, vacuum on the other
%   openmeeg           boundary element method, based on the OpenMEEG software
%   bemcp              boundary element method, based on the implementation from Christophe Phillips
%   dipoli             boundary element method, based on the implementation from Thom Oostend