How do I make a block diagonal matrix using blkdiag function for a N dimensions

I have a matrix A which can be converted using the
blkdiag(A,A);
for 2D and m
blkdiag(A,A,A);
for 3D but I want the user to input the dimension and based on that a block diagonal matrix has to be generated something like
blkdiag(A,A,A....An);
. I know we have to use loops but i cant wrap my head around the actual code, if anyone could help that'd be great !

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Operating on Diagonal Matrices에 대해 자세히 알아보기

제품

릴리스

R2019a

태그

질문:

2019년 8월 4일

답변:

2019년 8월 4일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by