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: elastic_2D_FDTD_O22.m
    path of file: ./repos/WaveProp_in_MATLAB/elastic_2D_FDTD_wave_propagation
    
    the code of the file until where you have to start completion: % Finite-differences in time domain(FDTD) elastic wave propagation in 2D 
% medium surrounded by simple sponge boundaries with exponential decay
% (Cerjan, 1985).
%
% We solve second order wave equation in time domain and displacement 
% formulation getting wavefield in terms of displacement vector [ux, uz].
%
% Elastic medium is parametrized by density and two velocities rho, vp
% and vs . We show CFL co
    
function (second derivative of a Gaussian):

force_x = sin(angle_force * pi / 180) * source_term * dt2rho_src / (dx * dz);
force_z = cos(angle_force * pi / 180) * source_term * dt2rho_src / (dx * dz);
min_wavelengh = 0.5*min(vs(vs>330))/f0;     % shortest wavelength bounded by velocity in the air

%% ABSORBING BOUNDARY (ABS)
abs_thick = min(floor(0.15*nx), floor(0.15*nz));         % thicknes of the layer
abs_rate = 0.3/abs_thick;      % decay rate

lmargin = [abs_thick abs_thick];
rmargin = [abs_thick abs_thick];
weights = ones(nz+2,nx+2);
for iz = 1:nz+2
    for ix = 1:nx+2
        i = 0;
        j = 0;
        k = 0;
        if (ix < lmargin(1) + 1)
            i = lmargin(1) + 1 - ix;
        end