MATLAB: Using vertcat on multidimensional array data

arraymultidimensionalvertcat

I need to create a new array from a 55x365x100 multidimensional array. Each 55×365 matrix (indexed by numbers 1:100) needs to be concatenated, so the resulting array should be 5500×365.
It appears that the vertcat function would accomplish this, but I really don't want to write out each index like so: vertcat(n(:,:,1),n(:,:,2),…,n(:,:,100))
Is there a way to make a list of all such matrices, n(:,:,k), that is usable in vertcat function?
I'm fairly new to MATLAB and still trying to familiarize myself with the syntax.

Best Answer

x = rand(55,365,100);
x_new = reshape(permute(x,[ 1 3 2 ]),5500,[]);