Bartlett test for homogeneity of variances
[pval, chisq, df] = nan_barttest (x1,x2,...,xn)
p-value
Perform a Bartlett test for the homogeneity of variances in the data vectors x1, x2, ..., xk, where k > 1.
Under the null of equal variances, the test statistic chisq approximately follows a chi-square distribution with df degrees of freedom.
The p-value (1 minus the CDF of this distribution at @var{chisq}) is returned in pval.