MATLAB: Array [10×8]

array

G(1,:)=[ 1 2 3 8 5 6 3 5];
for j = 1:10,
for i = 1:8,
n(j,i)=G(1,8);
end
end
i need to calculate 10 rows and 8 columns, G value is = [ 1 2 3 8 5 6 3 5];
i couldn't get the G value in 10 rows.

Best Answer

G = [ 1 2 3 8 5 6 3 5];
n = repmat(G, 10, 1)
or
n = G(ones(1, 10), :);