### how to make a new mat variable with 9 elements

Hi,
I want make a new mat ~~file ~~variable (image) of 9 element where i can add the 4 pixel of a mat image in its corner and the row and clumns in the mat. and in the middle the mat image itself. how i can do this.
i am not able to create a mat variable with 9 elements.

i have done this in matlab.

I=imread('1.jpg');
in= im2double(rgb2gray(I));
[row col]=size(in);
h = ones(5);
out1=stdfilt(in,h); %Standard deviation from inbuilt function
imshow(out1);

%% Replicating two rows and two columns on all the four sides of image
image1=[ in(1,1), in(1,:), in(1,col);
in(:,1), in, in(:,col);
in(row,1), in(row,:), in(row,col)];

here in(1,1),in(1,col),in(row,1), in(row,col) are the 4 corner of new mat variable, and in is the previous mat image and else are the boundries of the new mat variable.

this is like adding a row and a column in existing image, so that i can do furter calcualtion.

help me.

thanks