{{indexmenu_n>999}} ====== Enlarge ====== ### Matrix.Enlarge($M$,$n$) takes a Matrix $M$ and replaces every entry with a diagonal matrix of size $n$ and entries equal to the original entry. Compare //[[documentation:language_reference:objects:matrix:functions:AddSpin|Matrix.AddSpin()]]//. ### ===== Example ===== ==== Input ==== M ={{3,5}, {-2,I}} print(Matrix.Enlarge(M,3)) ==== Result ==== { { 3 , 0 , 0 , 5 , 0 , 0 } , { 0 , 3 , 0 , 0 , 5 , 0 } , { 0 , 0 , 3 , 0 , 0 , 5 } , { -2 , 0 , 0 , (0 + 1 I) , 0 , 0 } , { 0 , -2 , 0 , 0 , (0 + 1 I) , 0 } , { 0 , 0 , -2 , 0 , 0 , (0 + 1 I) } } ===== Table of contents ===== {{indexmenu>.#1|msort}}