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: lapVec.m
    path of file: ./repos/M-SPARC/src
    
    the code of the file until where you have to start completion: function DLX = lapVec(DL11,DL22,DL33,DG1,DG2,DG3,X,S)
% @ brief    Calculates laplacian vector product using 
%            Kronecker product method
% @ authors
%         Abhiraj Sharma <asharma424@gatech.edu>
%         Qimen Xu <qimenxu@gatech.edu>
%         Phanish Suryanarayana <phanish.suryanarayana@ce.gatech.edu>
%
% @param DLii        Discrete laplacian component in 1D along ith direction
% @param DGi         Discrete gradient component in 1D along ith direction
% @param X           N x Ns matrix of eigenfunctions of Hamiltonian
% @param DLX         Discrete laplacian times X
%
% @ references
%              "On real-space Density Functional Theory for 
%               non-orthogonal crystal systems: Kronecker product 
%               formulation of the kinetic energy operator (Sharma et. al. 2018)"
%
% @copyright (c) 2019 Material Physics & Mechanics Group, Georgia Tech
%=====================================================================================
Nx = S.Nx;Ny = S.Ny;Nz = S.Nz;
if S.cell_typ == 1 % orthogonal systems
	X1 = reshape(X,Nx,Ny,[]);

    
function DLX = lapVec(DL11,DL22,DL33,DG1,DG2,DG3,X,S)
% @ brief    Calculates laplacian vector product using 
%            Kronecker product method
% @ authors
%         Abhiraj Sharma <asharma424@gatech.edu>
%         Qimen Xu <qimenxu@gatech.edu>
%         Phanish Suryanarayana <phanish.suryanarayana@ce.gatech.edu>
%
% @param DLii        Discrete laplacian component in 1D along ith direction
% @param DGi         Discrete gradient component in 1D along ith direction
% @param X           N x Ns matrix of eigenfunctions of Hamiltonian
% @param DLX         Discrete laplacian times X
%
% @ references
%              "On real-space Density Functional Theory for 
%               non-orthogonal crystal systems: Kronecker product 
%               formulation of the kinetic energy operator (Sharma et. al. 2018)"
%
% @copyright (c) 2019 Material Physics & Mechanics Group, Georgia Tech
%=====================================================================================
Nx = S.Nx;Ny = S.Ny;Nz = S.Nz;
if S.cell_typ == 1 % orthogonal systems
	X1 = reshape(X,Nx,Ny,[]);
	l_zs = size(X1,3);
	Hlx1 = zeros(Nx,Ny,l_zs);
	for i=1:l_zs
		Hlx1(:,:,i) = DL11*X1(:,:,i) + X1(:,:,i)*DL22.';
	end