1% Nm = LagkJointMomentsFromTrace(trace, K, L)
3% Returns the lag-L joint moments of a trace.
5% It
is computed as `Nm_{i,j}=\frac{1}{N-L}\sum_{k=0}^{N-L} x_k^i x_{k+L}^j`.
9% trace : vector of doubles
12% The joint moments are computed up to order K
14% The lag-L joint moments are computed.
15% The
default value
is 1.
19% Nm : matrix, shape (K,K)
20% The matrix of joint moments, starting from moment 0
22function Nm = LagkJointMomentsFromTrace (trace, K, L)
34 Nm(i+1,j+1) = dot(trace(1:end-L).^i, trace(L+1:end).^j) / (length(trace)-L);