Imaginary part of mscohere
11 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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
0 comentarios
Respuestas (1)
Christiaan
el 10 de Mzo. de 2015
Editada: Christiaan
el 10 de Mzo. de 2015
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 comentario
David Haslacher
el 28 de Jul. de 2017
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]
Ver también
Categorías
Más información sobre Parametric Spectral Estimation en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!