If you already have all these data available (in separate vectors, I assume) then you do not need any loops.
For example, if you had
x = [all the ODE mass values];
y1 = [values for y(1)];
y2 = [values for y(2)];
yt = [values for y(t)];
you could do:
matrix = [x y1 y2 ... yt]; if all of these are column vectors and of the same length
matrix = [x; y1; y2; ...; yt]'; if all of these are row vectors of the same length
NOTE: Please observe the differences in syntax between the two versions!