Expert Answer:
:
B= [1 2 5; 3 4 6; 7 8 9]
n1=2 %Position of the row to add
m1=3 %position of the column to add
%-------------------------
A=zeros(size(B)+2)
A(2:end-1,2:end-1)=B
[n,m]=size(A)
A=[A(:,1:m1) zeros(n,1) A(:,m1+1:end)]
A=[A(1:n1,:); zeros(1,m+1) ;A(n1+1:end,:)]
A([1 end],:)=[];
A(:,[1 end])=[]