let's say I have 3 matrices A,B,C and store them in a block diagonal matrix, such that I can refer easily to them in a for loop.
D=[A B C; B A B; C A B];
If I say D(i,j) I get an entry of matrix D. But I want the block stored in the i-th row and the j-th column in de way D is defined in the example. D(1,2) should return matrix B and D(2,2) matrix A. How can I do this?