For Example I have a matrix-
A = [1 2 3; 4 5 6; 7 8 9]
now i need a matrix
B = [1 1 1 1 1;1 1 2 3 1;1 4 5 6 1; 1 7 8 9 1; 1 1 1 1 1]
Means i need to add an equal number of elements around the matrix. Thanks in advance.
matrix
A = [1 2 3; 4 5 6; 7 8 9]
B = [1 1 1 1 1;1 1 2 3 1;1 4 5 6 1; 1 7 8 9 1; 1 1 1 1 1]
Best Answer