Actually, there's an analytical solution to this. Let E() be expectation and S() be standard deviation in the following derivations.
For a single dice,
E(x) = (1+2+3+4+5+6)/6 = 3.5 and
S(x) = {[(1-3.5)^2+(2-3.5)^2+(3-3.5)^2+(4-3.5)^2+(5-3.5)^2+(6-3.5)^2)]/6}^0.5 = 1.71
For n dice,
E(nx) = 3.5n and
S(nx) = [(1.708^2)*n]^.5 = (2.917n)^0.5
Much faster than MATLAB and absolutely correct.