If you look at the size of a matrix

 X = rand(3,4)

size(X)

You will see that it is of size 3x4. However, when you look at the size of X(:,1,:)it is not a matrix but a three-way array of size 5x1x61. Thus, we can easily see that it is in fact a 5x61 matrix, but MATLAB sees it as a three-way array where one of the ways/modes is of dimension 1. So in order to be able to plot this actual matrix held in a three-way array, the three-way array must be converted to matrix. The function squeeeze will do this (type help squeeze)