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: split_model.m
    path of file: ./repos/MSAT/examples/splitting_model
    
    the code of the file until where you have to start completion: % SPLIT_MODEL.M - Example script modelling shear-wave splitting variation 
%                 with backazimuth. 
%
% This script demonstrates simple shear-wave splitting modelling using 
% the MSAT toolset. It predicts the SKS splitting variation with azimuth 
% associated with two dipping, partially-aligned olivine layers. The 
% splitting in each layer is calculated using the Christoffel equation 
% (MS_phasvels), and, by default, combined using N-layer effective 
% splitting equations (MS_effective_splitting_N; Silver and Savage, GJI, 
% 1994). Straight raypaths through the upper mantle are assumed.
%
% The example can also calculate the effective splitting pa
    
function split_model(varargin)

%  ** Handle optional arguments and defaults
   e_split_mode = 's&s'; % Default mode for effective splitting calc.
   min_azi = 0.0;
   max_azi = 360.0;
   del_azi = 1.0;
   iarg = 1 ;
   while iarg <= (length(varargin))
       switch lower(varargin{iarg})
           case 'mode'
              e_split_mode = lower(varargin{iarg+1}) ; 
              iarg = iarg + 2;
           case 'min_azi'
               min_azi = varargin{iarg+1};
               iarg = iarg + 2;
           case 'max_azi'
               max_azi = varargin{iarg+1};
               iarg = iarg + 2;
           case 'del_azi'
               del_azi = varargin{iarg+1};
               iarg = iarg + 2;
           otherwise
               error(['Unknown option']);
       end