I need some help in converting a 2X2 matrix to a 4X4 matrix in the following manner:
A = [2 6; 8 4]
should become:
B =
Here's one more solution:
A = [2 6; 8 4]; B = A( ceil( 0.5:0.5:end ), ceil( 0.5:0.5:end ) );
which uses indexing to do everything and doesn't rely on the size or shape of A.