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: generateDisplayData.m
    path of file: ./repos/OpenFace/model_training/CCNF/patch_experts/ccnf_training
    
    the code of the file until where you have to start completion: function [ display_array ] = generateDisplayData( X )

    
function [ display_array ] = generateDisplayData( X )
%GENERATEDISPLAYDATA Summary of this function goes here
%   Detailed explanation goes here
    example_width = 11;
    example_height = 11;
    
    % Compute rows, cols
    [m n] = size(X);

    % Compute number of items to display
    display_rows = floor(sqrt(m));
    display_cols = ceil(m / display_rows);

    % Between images padding
    pad = 1;

    % Setup blank display
    display_array = double(zeros(pad + display_rows * (example_height + pad), ...
                           pad + display_cols * (example_width + pad)));
    % Copy each example into a patch on the display array
    curr_ex = 1;
    for j = 1:display_rows
        for i = 1:display_cols
            if curr_ex > m, 
                break; 
            end