(adsbygoogle = window.adsbygoogle || []).push({}); [Mathematica] “Explose” a matrix

Hi all,

Sorry for the title

Here is what I need to do : Transform this matrix (sorry, didn't find the LaTeX for matrices; pmatrix does not work)

a b c 0 0 0 0 0 0

d e f 0 0 0 0 0 0

g h i 0 0 0 0 0 0

0 0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0 0

into

a 0 0 b 0 0 c 0 0

0 0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0 0

d 0 0 e 0 0 f 0 0

0 0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0 0

g 0 0 h 0 0 i 0 0

0 0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0 0

if you see what I mean… I looked into ArrayPad[] but my pattern is more complicated than a simple padding…

What's the best solution do that ?

TIA

**Physics Forums | Science Articles, Homework Help, Discussion**

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# [Mathematica] Explose a matrix

**Physics Forums | Science Articles, Homework Help, Discussion**