I am trying to perform a so called Ljung Box test on different data I have been given. I want to check whether my data is within a 0.95 quantile of the chi squared distribution. This value I can find in tables (such as http://www.unc.edu/~farkouh/usefull/chi.html). The data have varying sample size resulting in different degrees of freedom for the chi-squared distribution and looking up all values manually would take a lot of time.
I am wondering whether there is any way in matlab I can find these values automatically and then to use these different values in my for-loop?