FUNCTION REFERENCE

crosscorr

Sample cross-correlation between two univariate time series.

Sample cross-correlation between two univariate time series.

Syntax

[xcf,lags,bounds,h] = crosscorr(y1,y2,NumLags=L,NumSTD=s)

Defaults: L=min(20,min(T1,T2)-1), s=2. Positive k correlates y1(t) with y2(t+k). Each series is centered before zero padding the shorter sequence; missing cross products are omitted. Output orientation follows y1; bounds are [s/sqrt(min(T1,T2));-s/sqrt(min(T1,T2))]. No outputs or four outputs draws stems and bounds. Historical positional (y1,y2,L,s) is accepted.

Example

[x,l,b]=crosscorr([1 3 2 5 4 7],[2 1 4 3 6 5],NumLags=2)

Differences from MATLAB: numeric vectors only; tables/timetables and explicit axes unsupported. Uses bounded direct sums. Missing-pair normalization and unequal-length centering can differ from MATLAB releases.

Reference: https://www.mathworks.com/help/econ/crosscorr.html

These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.