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: generate_assemblyFile.m
    path of file: ./repos/Isogeometric-Analysis/projects/elastostatics/3d_rectangular_bar_in_tension
    
    the code of the file until where you have to start completion: %--------------------------------------------------------------------------
%  Author: Isaac J. Lee (ijlee2@ices.utexas.edu)
%  
%  
%  Summary:
%  
%  This routine creates the assembly files 
    
function generate_assemblyFile(numRefinements)
    % Set the path to the assembly files directory
    directory_assembly = sprintf('../assembly_files/numRefinements%d/', numRefinements);
    
    % Create the directory if it does not exist
    if ~exist(directory_assembly, 'dir')
        mkdir(directory_assembly);
    end