If I have 8 different 10*10 matrices, for example as:
Ai=rand(10,10);
Aj=rand(10,10);
Ak=rand(10,10);
Al=rand(10,10);
Bi=rand(10,10);
Bj=rand(10,10);
Bk=rand(10,10);
Bl=rand(10,10);
I want to calculate the division of them in a way that, for example for the first row I would get:
C{(1,1):(1,4)}=[(Ai/Bi)/(Aj/Bk), (Ai/Bj)/(Ak/Bl), (Ai/Bk)/(Al/Bj), (Ai/Bl)/(Aj/Bk)];
In a way that I would get a 4*4 cell array as the final result that each cell contains a 10*10 matrix. The indexing is basically rolling around in the order of the field i,j,k,l. So I would get the following for the second row:
C{(2,1):(2,4)}=[(Aj/Bi)/(Ak/Bl), (Aj/Bj)/(Al/Bi), (Aj/Bk)/(Ai/Bj), (Aj/Bl)/(Aj/Bk)];
I basically want to, in each row, keep the first upper denominator constant as the corresponding dimension (2:j) and roll around the order of other dimensions for the other matrices.
I didn't simplify the equations into for example (Ai*Bl/Ak*Bj) to follow the indexing protocol (i through l). Can someone please help me with writing the code for this operation? I don't want to calculate them individually, can I use a for loop or a function to do this operation? Thank you!