image thumbnail

block diagonal representation

version (2.07 KB) by David Holdaway
Converts a matrix into a cell array of different sized matrices that make up the blocks.


Updated 11 Apr 2012

View License

Essentially if one has a matrix M that they wish to store more efficiently in memory/use for function bldiagmult.m (same author), then use
cellform = blkdiagconv( M );
this is such that using the inbuilt Matlab function one has
M == blkdiag(cellform{:})
it is essentially the inverse function to blkdiag.

Cite As

David Holdaway (2021). block diagonal representation (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2012a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Inspired: mat2blk

Community Treasure Hunt

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

Start Hunting!