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: CreateMesh2.m
    path of file: ./repos/StiffMa/tbx/StiffMa/Common
    
    the code of the file until where you have to start completion: function [elements, nodes] = CreateMesh2(nelx,nely,nelz,sets)
% CREATEMESH2 is a simple mesher of a unit cubic with configurable and structured
% discretization with Hex8 elements. It is faster than CREATEMESH.
% 
%  INPUT:
%   nelx, nely, nelz:   Number of elements on X-Y-Z direction
%   sets.dTN:           Data precision for "nodes" ['single' or 'double']
%   sets.dTE:          	Data precision for "elements" ['uint32','uint64']
%
%  OUTPUT:
%   elements:           Conectivty matrix of the elements [nelx8]
%   nodes:              X,Y,Z coordinates of the nodes [nnodx3]
%
%   See also CREATEMESH
%
%   For more information, see the <a href="matlab:
%   web('https://github.com/fjramireg/StiffMa')">StiffMa</a> web site.

%   Written by Francisco Javier Ramirez-Gil, fjramireg@gmail.com
%   Universidad Nacional de Colombia - Medellin
%   Created:  February 08, 2020.    Version: 1.0
%   Modified: June 22, 2020.        Versi√≥n: 1.1. Less inputs. Improved doc
% 

    
function [elements, nodes] = CreateMesh2(nelx,nely,nelz,sets)
% CREATEMESH2 is a simple mesher of a unit cubic with configurable and structured
% discretization with Hex8 elements. It is faster than CREATEMESH.
% 
%  INPUT:
%   nelx, nely, nelz:   Number of elements on X-Y-Z direction
%   sets.dTN:           Data precision for "nodes" ['single' or 'double']
%   sets.dTE:          	Data precision for "elements" ['uint32','uint64']
%
%  OUTPUT:
%   elements:           Conectivty matrix of the elements [nelx8]
%   nodes:              X,Y,Z coordinates of the nodes [nnodx3]
%
%   See also CREATEMESH
%
%   For more information, see the <a href="matlab:
%   web('https://github.com/fjramireg/StiffMa')">StiffMa</a> web site.

%   Written by Francisco Javier Ramirez-Gil, fjramireg@gmail.com
%   Universidad Nacional de Colombia - Medellin
%   Created:  February 08, 2020.    Version: 1.0
%   Modified: June 22, 2020.        Versi√≥n: 1.1. Less inputs. Improved doc
% 

%% INPUTS CHECK
if ~( mod(nelx,1)==0 && mod(nely,1)==0 && mod(nelz,1)==0 )          % Check if inputs "nelX" are integers
    error('Error. Inputs "nelx", "nely" and "nely" must be integers');
elseif ( nelx<0 || nely<0 || nelz<0 )                               % Check if "nel" are positives
    error('Error. Inputs "nelx", "nely" and "nely" must be positives');
elseif ~( strcmp(sets.dTN,'single') || strcmp(sets.dTN,'double') )  % Check data presicion for nodal coord.
    error('Error. Input "sets.dTN" must be "single" or "double"');
elseif ~( strcmp(sets.dTE,'uint32') || strcmp(sets.dTE,'uint64') )  % Check data presicion for connect. array
    error('Error. Input "sets.dTE" must be "uint32", "uint64"');
end