[h,pValue,stat,cValue] = lbqtest(res)
res
Vector of residuals for which the test statistic is computed. The last element corresponds to the most recent observation. Typically, res contains (standardized) residuals obtained by fitting a model to an observed time series.