function [coordinates, Anf] = meshFiber_rectangle(h, b, nFibersInRow, nFibersInCol)
    % Create a mesh of fibers in a rectangle.

    nTot = nFibersInRow * nFibersInCol;  
    coordinates = zeros(nTot, 2);  

    for i = 1:nFibersInRow
        y = h / 2 - h / (2 * nFibersInRow) - h / nFibersInRow * (i - 1);
        for j = 1:nFibersInCol
            z = -b / 2 + b / (2 * nFibersInCol) + b / nFibersInCol * (j - 1);
            coordinates(nFibersInCol * (i - 1) + j, 1) = y;  
            coordinates(nFibersInCol * (i - 1) + j, 2) = z;  
        end
    end

    Afib = (h * b) / nTot;  
    Anf = Afib * ones(nTot, 1);  
end