FUNCTION REFERENCE
autocorr
Sample autocorrelation of a univariate time series.
Sample autocorrelation of a univariate time series.
Syntax
[acf,lags,bounds,h] = autocorr(y,NumLags=L,NumMA=q,NumSTD=s)Defaults: L=min(20,T-1), q=0, s=2. Biased sample ACF; bounds are [upper;lower] using Bartlett's MA(q) formula. NaNs retain time positions and each lag averages available pairs. With no outputs or four outputs, draws a stem plot and confidence bounds. Historical positional (y,L,q,s) syntax is accepted.
Example
[a,l,b]=autocorr([1 3 2 5 4 7 6 2],NumLags=3)Differences from MATLAB: numeric vectors only; table/timetable inputs, explicit axes input are unsupported. At most 1000000 observations, 2048 lags and 100000000 work units. Uses direct sums for short bounded lag sequences.
Reference: https://www.mathworks.com/help/econ/autocorr.html
These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.