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: Neighbors.m
    path of file: ./repos/MATBOX_Microstructure_analysis_toolbox/src/Microstructure_generation
    
    the code of the file until where you have to start completion: function [E, W, N, S, U, L] = Neighbors (Nx, Ny, Nz)

    
function [E, W, N, S, U, L] = Neighbors (Nx, Ny, Nz)
% inputs: Nx, Ny, Nz    and     outputs: E, W, N, S, U, L
% 'Nx, Ny, Nz' are voxel dimensions of the 3D domain
% 'E, W, N, S, U, L' identify indices of E(ast), W(est), N(orth), S(outh), 
% U(pper) and L(ower) neighbors respectively
%__________________________________________________________________________
% Programmed by     : Aashutosh Mistry
% Created on        : Jul 05, 2020
% Modifications     : (none)
%__________________________________________________________________________

E = zeros(Nx,Ny,Nz);                        % east neighbor
W = zeros(Nx,Ny,Nz);                        % west neighbor
N = zeros(Nx,Ny,Nz);                        % north neighbor
S = zeros(Nx,Ny,Nz);                        % south neighbor
U = zeros(Nx,Ny,Nz);                        % upper neighbor
L = zeros(Nx,Ny,Nz);                        % lower neighbor

for k=1:Nz
    for j=1:Ny
        for i=1:Nx            
            %east neighbor
            if i<Nx
                E(i,j,k) = Index1D((i+1),j,k, Nx,Ny,Nz);
            else
                E(i,j,k) = Index1D(1,j,k, Nx,Ny,Nz);
            end