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 =
Can be done even easier than Jason's solution:
B = A([1 1 2 2], :); % replicate the rows B = B(:, [1 1 2 2]); % replicate the columns