Reputation: 4899
Is it possible to reshape every slice of a 3D matrix using vectorization rather than the following for-loop-solution?
orig3D = rand(228,1,2);
for n = 1 : 2
new3D(:,:,n) = reshape(orig3D(:,:,n), [12,19])';
end
Upvotes: 2
Views: 62