MATLAB: How to asign 2 dimesion array to 3 dimension array if it is not possible then how can i assign each 2 dimension array to 3 dimension array in for loop

3d matrixmatrixmatrix array

how to asign 2 dimesion array to 3 dimension array if it is not possible then how can i assign each 2 dimension array to 3 dimension array in for loop

Best Answer

One element of an array can contain one element only. This is the definition of "element".
Perhaps you are looking for a cell:
A{1} = [1 3 5];
A{2} = [5 8 11];
B{1} = [1, 3, 5; 5, 8, 11];
These basics are explained exhaustively in the "Getting Started" chapters of the documentation.