I have a 2X2 matrix, for instance A=matrix(1:4,2,2)
. With this matrix, I want to build matrix whose diagonal element is A like below. This example has just three A but I would like to make matrix with n diagonal element of matrix A
|A 0 0|
|0 A 0|
|0 0 A|