MATLAB: Removing a column from multidimensional array

multidimensional arrayremove column

Hello,
I have a 5x6x7 3-dimensional matrix and would like to remove the last column in the matrix so that it is 5x5x7. (i.e. 5 rows, 5 columns, across 7 sheets)
Could anyone advise how I can remove this column?
Thank you.

Best Answer

a=a(:,1:5,:)