Create a 3D matrix

Create a 3D matrix A = zeros(20, 10, 3); %# Creates a 20x10x3 matrix Add a 3rd dimension to a matrix B = zeros(4,4); C = zeros(size(B,1), size(B,2), 4); %# New matrix with B’s size, and 3rd dimension of size 4 C(:,:,1) = B; %# Copy the content of B into C’s first set of … Read more