Multivariate power spectral density is performed by the Welch's averaged, modified periodogram method.
ltpda_cohere estimates the coherence of time-series
signals, included in the input AOs. Data are windowed prior to the estimation of the spectra, by multiplying
it with a spectral window object, and can be detrended by polinomial of time in order to reduce the impact
of the border discontinuities. The window length is adjustable to shorter lenghts to reduce the spectral
density uncertainties, and the percentage of subsequent window overlap can be adjusted as well.
Syntaxis
b = ltpda_cohere(a1,a2,a3,...,pl)
a1, a2, a3, ... are AOs containing the input time series to be evaluated. They need to be in a number N >= 2. b includes the NXN output objects. The parameter list pl includes the following parameters:
If the user doesn't specify the value of a given parameter, the default value is used. The function makes coherence estimates between all input AOs. Therefore, if the input argument list contains N analysis objects, the output a will contain NxN coherence estimates. The diagonal elements will be 1.
Example
Evaluation of the coherence of two time-series represented by: a low frequency sinewave signal superimposed to white noise, and a low frequency sinewave signal at the same frequency, phase shifted and with different amplitude, superimposed to white noise.
x = ao(plist('waveform','sine wave','f',0.1,'A',1,'nsecs',1000,'fs',10)) + ... ao(plist('waveform','noise','type','normal','nsecs',1000,'fs',10)) + ... ao(plist('tsfcn', 't','nsecs',1000,'fs',10)); y = ao(plist('waveform','sine wave','f',0.1,'A',2,'nsecs',1000,'fs',10,'phi',90)) + ... 4*ao(plist('waveform','noise','type','normal','nsecs',1000,'fs',10)); pl = plist('win',specwin(plist('name','BH92')),'nfft',1000); z = ltpda_cohere(x,y,pl); iplot(z(1,1)); iplot(z(1,2));