Вы можете сделать это с помощью простого for
l oop
% Create some dummy 3D data
c = repmat( {rand(5,3,20)}, 3, 1 );
% Loop over the cell array from element 2
for r = 2:numel(c)
% Copy the last slice from the current array into the previous one
c{r-1} = cat( 3, c{r-1}, c{r}(:,:,end) );
% Remove the last slice from the current array
c{r}(:,:,end) = [];
end
Результат: