Imaginary part of mscohere

8 次查看(过去 30 天)
Eric
Eric 2015-3-8
Hi everybody,
Is there a way to extract the imaginary part of the coherence when using mscohere? I can't find the original code anywhere. It seems to be protected by MATLAB.
I'm very interested in using the Welch method.
Best,
Eric

回答(1 个)

Christiaan
Christiaan 2015-3-10
编辑:Christiaan 2015-3-10
Dear Eric,
The formula for the Magniture Squared Coherence can be found here. Pxx and Pyy are the power spectral densities of the signals x and y. (PSD of Autocorrelation) These two quantities are real and positive. The magnitude of the cross power spectral density is (as any magnitude of complex numbers) also real and positive. Therefore you can from definition not extract a 'complex part of the MSC'.
If you still interested in the background of the mscohere function, you can type in the matlab prompt:
edit mscohere
Then you can find that the mscohere function uses the welch function. Since the function is private type in:
which welch -all
Now you have found the folder where the welch function is defined. The last step is to type in edit('.....link of previous output') and look at 'case 'mscohere'.
Good luck! Christiaan
Kind regards, Christiaan
  1 个评论
David Haslacher
David Haslacher 2017-7-28
I would wager that he's talking about coherency, Cab/sqrt(Caa * Cbb), which is complex [1]. Coherence is then the modulus of coherency.
Nolte G., Bai O., Wheaton L., Mari Z., Vorbach S., Hallett M. (2004). Identifying true brain interaction from EEG data using the imaginary part of coherency. Clin. Neurophysiol. 115, 2292–2307. 10.1016/j.clinph.2004.04.029 [PubMed] [Cross Ref]

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Signal Generation and Preprocessing 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by