storing the number of mbase in row i in the vector s[day, mbase]
for(n in 0:(2^K-1)){
if(mbase[i,j] == n){s[i,n+1] = s[i, n+1] + 1} }
} # closes the j loop
} # closes the i loop