A=fc_amat.random.randn(100,3,4);% A: 100-by-3-by-4 amat B=randn(3,4); A(10)=B; % B assign to the 10-th matrix A(20:25)=B; % the matrices 20 to 25 are set to B A(30:2:36)=0; % the matrices 30,32,34 and 36 are set to 0 A(120)=1; % now A is a 120-by-3-by-4 amat ... A(1,2)=0; % elements (1,2) of all the matrices are set to 0 A(2:3,3)=1; % elements (2,3) and (3,3) of all the matrices are set to 1 A(4,5)=1; % now A is a 120-by-4-by-5 amat ... A(5,1,2)=pi; % element (1,2) of the 5-th matrix is set to pi A(10:15,1,2)=1; % element (1,2) of the matrices 10 to 15 are set to 1 A(130,6,7)=1; % now A is a 130-by-6-by-7 amat ...