Tag Info

Hot answers tagged


I propose: quarter = Partition[#, Dimensions[#]/2] &; pad = PadLeft[#, Dimensions@#2, #2] &; matrixInsert[small_, large_] := ArrayFlatten[ pad @@ quarter /@ {small, large} ] Test: myM = {{a1, a2, c1, c2}, {a2, a3, c2, c3}, {c1, c2, d1, d2}, {c2, c3, d2, d3}}; myLM = Array[Plus, {8, 8}, {0, 1}]; matrixInsert[myM, myLM] // MatrixForm ...


First we'll define our matrices. Using your definitions we can make a matrix m: m = DWBCH[b1, b2, c2, 6] sA is defined like so: sA = {{b1, c2}, {c2, b2}} (not Sa, since Mathematica capitalizes all it's functions we should generally use lowercase variables to avoid collisions.) We can use Partition to split apart the matrix into sA-sized subarrays in ...

Only top voted, non community-wiki answers of a minimum length are eligible