function M=rvcentrl(X, n) % rvcentrl(X, n) generates a column vector of the nth central moments of % the experiments of the random variable matrix X s=size(X); M=zeros(1, s(1)); for i=1:s(1), EX=X(i,:); M(i)=sum((EX-mean(EX)).^n)/length(EX); end