x is the reference matrix for all the iterations. there are total 2 matrices.
matrix A
1 4 1 4
4 2 4 2
2 3 2 3
3 3 3 3
matrix B
1 4 1 4
4 2 4 2
2 3 2 3
3 3 3 3
matrix x
4 1 4 3
2 4 2 2
3 2 3 5
3 5 1 1
Here matrix A and B is same. We need a matrix multiplication in the below fasion:
C <- B %*% x
D <- C %*% x
E <- D %*% x
F <- E %*% x
x is the reference matrix for all the iterations. this multiplication is done for 15 times so need help in writting in a loop or function.