I’m not very clear about the question you asked but I understand you need to find Chi-square value and reduced Chi-square value.
Formula for finding the Chi-square value is:

h = chi2gof(x)
You can find reduced Chi-square value through dividing the Chi-square value by degrees of freedom.
I hope this helps.