MATLAB: Coefficient of a matrix on matlab

coefficientMATLABmatrix

Hello assuming we have four matrices
A = [1 2; 3 4];
B = [5 6; 7 8];
C = [9 10; November 12];
D = [13 14; 15 16];
and we want to obtain a new matrix M
M = [[1 5 9 13] [2 6 10, 14]; [3 7 10, 14] [4 8 12 16]]
such as: each field (matrix image) iwritten as [a b c d]
That means :
M (i, j) = printf ("["% d% d% d% d ']', A (i, j), B (i, j), C (i, j), D (i, j ))
I know it is a false writing in matlab but is there such a focntion on matlab with what I write M (i, j) = printf or disp

Best Answer

M = cat(3, A, B, C, D);