"The first input, fun, is a function handle. fun(x,y,z) must accept a vector x and scalars y and z, and return a vector of values of the integrand."
When your function is called with a vector z and scalar x and y, the expressions (x-m1) and (y-m2) will be scalars but the expression (z-m3) will be a vector. One of the concatenation steps will not work:
[(x-m1),(y-m2),(z-m3)] % Doesn't work if z is a column vector [(x-m1);(y-m2);(z-m3)] % Doesn't work if z is a row vector
I believe z will be a row vector, so the latter step will not work.