Hi,
as you see, the matrix dimensions are given by nLayers*N x nLayers*N. This means, they are square and the size is given by the number of subcarriers N and the number of active spatial layers nLayers. You cannot directly choose this size. According to the schedule, this size will be a multiple of 12 since scheduling is done in terms of resource blocks.
best
Stefan