plot_autocov

Autocovariance plotting utility

Syntax

   plot_autocov(G,leg,dt,trange,auto,acorr)

Arguments

See also Common variable names and data structures.

input

   G          matrix of autocovariance matrices
   leg        cell vector of legend strings matching G (default: 'autocov 1', 'autocov 2', etc.)
   dt         sample time step in seconds or empty (default) for number of lags
   trange     time range to plot: empty for all (default) else an ascending 2-vector
   auto       only plot auto- (not cross-) spectra (default: true)
   acorr      plot autocorrelation rather than autocovariance (default: false)

Description

Plots autocovariance sequence G against lags for each pair of variables on a grid. If the acorr flag is nonzero, autocorrelation rather than autocovariance is plotted (see cov2corr). If acorr is negative, then zero-lag correlation is omitted (this may be useful since lag-zero autocorrelation can be an order of magnitude larger than autocorrelation at higher lags - e.g. for a near-white noise process).

See also

autocov_to_pwcgc | tsdata_to_autocov | cpsd_to_autocov | cov2corr