I have a matrix A which is m*n. I want to create a block diagonal matrix of size 100*100 whose diagonal elements are the matrix A.
[A,0,0,0 0,A,0,0 0,0,A,0 0,0,0,A ... ]function, out = blkdiag(A,A,A,A,...) needs writing down the matrix so many times. Is there any other way to do this (not typing so many matrices as input arguments of blkdiag)?
Best Answer