MATLAB: Repeat combination in matlab loop

loop

example?

Best Answer

A = ceil(10*rand(276,1))
S = sum(reshape(A,12,[]),1)