MATLAB: Create new matrix with special structure

special structure

I have a Matrix named p. the sixe of it is m*n (m=6, n=4)
I want to create new matrix based on matrix p with aid of following rule
of course my real Matrix has a large size (500*500*6) and this question is just an example.
I write some thing but it must repeat in columns with so called rule and also I must save it in special structure
and my simple code:
for j=0:2:m-1
newmatrix=[p(1+j,1) p(2+j,1)]

Best Answer

Try this:
>> A = reshape(1:6*4,6,4); % define a fake data array of size 6x4
>> B = struct('data',reshape(num2cell(reshape(A(1:end-6),2,[]).',2),3,[]))
B =
3x3 struct array with fields:
data
>> B(1).data
ans =
1 2
>> B(9).data
ans =
17 18