[SciPy-user] Easy way to make a block diagonal matrix?
Stéfan van der Walt
Wed May 20 16:31:56 CDT 2009
2009/5/20 Joseph Smidt <firstname.lastname@example.org>:
> Is there an easy way to create a block diagonal matrix from
> existing matrices? For example, lets assume I have three 2x2 matrices
> a, b and c. Is there something like d = block_diag(a,b,c) which would
> create a 6x6 block diagonal matrix from a, b and c? If not, is there
> a straight forward way to accomplish the same thing?
The attached function should do the trick.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 960 bytes
Desc: not available
Url : http://mail.scipy.org/pipermail/scipy-user/attachments/20090520/f30c0928/attachment.obj
More information about the SciPy-user