suppose I have a matrix like this:
a = 1 2 3 4
I want to double the size of matrix and create something like this:
use kron - Kronecker tensor product:
kron(a,ones(2)) ans = 1 1 2 2 1 1 2 2 3 3 4 4 3 3 4 4