Trying to combine multiple square matrices diagonally into a combined larger matrix

1 view (last 30 days)
Im having trouble figuring out how to place square matricies diagonally within a larger combined matrix, does anyone know of a way of doing this? (Trying to create something like the above T matrix)(If the image is not clear i can upload another one)

Answers (1)

Jon on 23 Nov 2021
Edited: Jon on 23 Nov 2021
You can use MATLAB's blkdiag function for this
so in your case
T = blkdiag(A,B,C)




Community Treasure Hunt

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

Start Hunting!