Do the following transformation. Take each element of matrix, and replace it by a 2 by 2 matrix with its values in places.
kron() in Matlab and KroneckerProduct in Mathematica and Maple can be used for this.
Matlab A=[1 2 3; 4 5 6; 7 8 9] kernel=ones(2,2) kron(A,kernel)
|
1 1 2 2 3 3 1 1 2 2 3 3 4 4 5 5 6 6 4 4 5 5 6 6 7 7 8 8 9 9 7 7 8 8 9 9 |