autocov_to_cpsd

Calculate cross-power spectral density from autocovariance sequence

Syntax

   [S,fres] = autocov_to_cpsd(G,fres)

Arguments

See also Common variable names and data structures.

input

   G          autocovariance sequence
   fres       frequency resolution to calculate (default: automatic)

output

   S          cross-power spectral density (cpsd) matrix
   fres       frequency resolution actually calculated

Description

Calculates the cross-power spectral density (cpsd) S at frequency resolution fres from the autocovariance sequence G defined as . This is essentially a Fourier transform:

implemented as a discrete Fast Fourier Transform (FFT). If a frequency resolution fres is not supplied, then the default is to set it to the number of autocovariance lags. The actual frequency resolution calculated is returned in fres. Call freqs = sfreqs(fres,fs), where fs is the sampling rate, to get a corresponding vector freqs of frequencies on [0,fs/2].

References

[1] L. Barnett and A. K. Seth, The MVGC Multivariate Granger Causality Toolbox: A New Approach to Granger-causal Inference, J. Neurosci. Methods 223, 2014 [ preprint ].

See also

cpsd_to_autocov | sfreqs