I think I have the error: with the first for-iteration I asign the vector [1 1 rand()] to the first matrix element a(1), the second iteration asigns vector [1 1 rand()] to the matrix element a(2) etc. So a(ii) is the syntax of the matrix element ii of the matrix "a". Do I see this right?
But what i want to do is to do some indexing 1 to 3 for a whole matrix with name "a" without having to give the matrix "a" of the first iteration, the second, and the third a different name like "a", "b", and "c". I need this indexing for a whole matrix because in the second for-loop I want to sum over all the different matrices, starting with matrix abc with dimension of the other matrices and adding the three matrices from above in each iteration. How can this be done?