MATLAB: Associate an array to every element of a matrix

array

How I can associate an array to every element of a matrix?
For example, i have a 2×2 Matrix. Now Matrix(1,1) must be an array, is it possible? How can I declare such multidimensional array?
Thanks in advance!

Best Answer

Is there a reason why you cannot simply use a 3-dimensional array?
Thus, if A has dimensions 2x2xn, then it can store n such 2x2 matrices. Access the k'th such matrix as
A(:,:,k)
Only if your individual arrays are not all the same size do you need to use a more complicated storage scheme such as a cell array. Admittedly, a cell array is trivial to use and create.