Hello I want to create a matrix which has block matrices on every diagonal. So on the first diagonal there is the matrix B(1) on the second diagonal the matrix B(2) and so on:
A =
1.0e-04 * 0.4059 0.0125 0 0 0 0 0 0 0.0125 0.4059 0 0 0 0 0 0 0.0845 0.0208 0.4059 0.0125 0 0 0 0 0.0208 0.0845 0.0125 0.4059 0 0 0 0 0.0425 0.0170 0.0845 0.0208 0.4059 0.0125 0 0 0.0170 0.0425 0.0208 0.0845 0.0125 0.4059 0 0 0.0267 0.0135 0.0425 0.0170 0.0845 0.0208 0.4059 0.0125 0.0135 0.0267 0.0170 0.0425 0.0208 0.0845 0.0125 0.4059
As this matrix can be quite large I want to avoid any loops. The main diagonal is no problem as I can use blkdiag but how can I solve the problem with the other diagonals?
Thank you a lot in advance!!
Best Answer