Calculate Skewness and Kurtosis of a Limit State Function with PCE

@bsudret @nluethen Thank you very much. I want to calculate the 3rd (4-th) order moments for Hermite PCE. In your papers, the expression of skewness and kurtosis as follows:
image
In addition, this is my Matlab code (uq_PCE_calculate_coefficients.m):
current_model.PCE(oo).Moments.Ske = sum(current_model.PCE(oo).Coefficients(1).*current_model.PCE(oo).Coefficients(2).*current_model.PCE(oo).Coefficients(3))./sum(current_model.PCE(oo).Coefficients(2:end).^3);
current_model.PCE(oo).Moments.Kur = sum(current_model.PCE(oo).Coefficients(1).*current_model.PCE(oo).Coefficients(2).*current_model.PCE(oo).Coefficients(3).*current_model.PCE(oo).Coefficients(4))…
./sum(current_model.PCE(oo).Coefficients(2:end).^4);
As above, by comparison with MCS, it still does not match well. Can you help me to check this Matlab code? Thank you very much!
Best regards,
QZ