Skip to content

wvCoherence

  wvCoherence: returns the coherence or SNR via a Welch periodogram

  Exampe:
  result=wvCoherence(fhandle, field1, value1, field2, value2....)

  returns a sigTOOLResultData object. If no output is requested the result
  will be plotted.

  Only continuous waveform data can be analyzed with this function. The
  coherence or SNR will be returned for each channel pair that [1] have the
  same sampling frequency and [2] were sampled synchronously.

  Valid field/value pairs are:
      'channellist'           a two-element cell array. Element 1 should 
                                contain the numbers of the channels to use
                                as reference channels, Element 2 those of
                                the source channels.
                                    (2-element cell array)
      'start'                 the start time for data processing
                                 (scalar, in seconds)
      'stop'                  the stop time for data processing
                                 (scalar, in seconds)'
      'windowtype'            the window to apply to the data
                                  (string: e.g. 'hamming')
      'windowlength'          the length of the window and also of the data
                                sections (scalar)
      'overlap'               the overlap to be used between data sections
                                as a percentage (scalar)
      'mode'                  a string: 'coherence' to return magnitude-
                              squared coherence, 'snr' for the signal-to-
                              noise ratio.
      'detrend'               Logical flag. If true, the linear trend will
                              each data section be removed from each data
                              section before taking its FFT


  -------------------------------------------------------------------------
  Author: Malcolm Lidierth 09/07
  Copyright © The Author & King's College London 2007-
  -------------------------------------------------------------------------