MATLAB: Create a loop which fills numbers 1-7 into matrix until matrix length reached

for loopMATLABmatrix manipulationwhile loop

This is gonna be an easy fix I'm sure. I have a matrix(21,4), and in colum 2 I would like to insert the numbers 1-7 so that they repeat until the end of the column (which is 21 rows long). So I probably need a loop of some sort I'm guessing.
Tried this, which obviously doesn't work:
for rowNumber = 1:21
for oneToSeven = 1:7
imageinformation(rowNumber, 2) = oneToSeven;
end
end

Best Answer

A - your matrix with size <21 x 4 >
A(:,2) = rem((0:size(A,1)-1)',7)+1;