You cannot do that for a 3-D matrix. You must have the same number of elements even if you shift things around, unless you have a whole plane in the X, Y, or Z dimension that is all zeros. In that case you can remove a whole plane. Otherwise it's not clear which dimension and direction the column goes and what direction to shift it in.
Your screenshot shows a 2-D matrix, and for that, you can shift one column up if that's what you want to do. Untested code:
[rows, columns, slices] = size(m);
for col = 1 : columns
thisColumn = m(:, col);
thisColumn(thisColumn == 0) = ;
m(:, col) = 0;
m(1 : length(thisColumn), col) = thisColumn;