1function mc = moment_joint_central_from_raw_mean(m, mu)
2% mc = moment_joint_central_from_raw_mean(m, mu)
4% Converts the joint power (raw) moments of a random vector into the joint
5% central moments about a given mean vector. Same conversion as
6% moment_joint_central_from_raw, with the means supplied rather than read off
7% the array, so that it also applies when the array does not carry the
11% m: array of size (n_1+1)x...x(n_d+1) holding the joint power moments
12% mu: vector of length d holding the means E[N_1],...,E[N_d]
15% mc: array of the same size as m holding the joint central moments
18% mc = moment_joint_central_from_raw_mean(m, [1.5, 2.5]);
21% A. Heindl and A. van de Liefvoort. Moment conversions for discrete
22% distributions. PMCCS, 2003, Section 4.
24sz = moment_tensorsize(m);
27 line_error(mfilename,'The mean vector mu must have one entry per dimension of m.');
35 T(i+1,k+1) = nchoosek(i,k) * (-mu(mode))^(i-k);
38 mc = moment_tensortrans(mc, T, mode);