for I=1:10,
   for J=1:3,
      A(I,J)=M(3*(I-1)+J);
   end
end
A
return