>
<div class="fragment"><pre class="comment">[C,tw,m]=nt_cov_lags(x,y,shifts) - covariance of [x,y] with lags

  C: covariance matrix (3D if length(lags)&gt;1)
  tw: total weight
  m: number of columns in x
  
  x,y: data matrices
  shifts: positive shift means y is delayed relative to x.

  x and y can be time X channels or time X channels X trials.  They can
  also be cell arrays of time X channels matrices.

 See also <a href="nt_relshift.html" class="code" title="function [xx,yy]=nt_relshift(x,y,shift)"