MATLAB Answers


Time-frequency spectral coherence analysis (desperate need of help)

Hinna Ahmed さんによって質問されました 2019 年 10 月 21 日
最新アクティビティ Hinna Ahmed さんによって コメントされました 2019 年 10 月 28 日
How is it possible in MATLAB to calculate Coherence as a function of time for two nonstationary signals (EEG) as shown on the below image. I want to genereate a similar one in matlab. Can someone please help me. I am very new to matlab so a code will help.
Below are the equations for coherence. I have read that a multitaper moving window can be used. For this application, a 300 ms multitaper moving window can be used in time steps of 10 ms. I dont know how to implent it in matlab.

  0 件のコメント

サインイン to comment.

2 件の回答

Answer by Kaashyap Pappu on 24 Oct 2019

As has already been suggested by Daniel, the mscohere function can be used. If you are using a custom window, generate the vector for the coefficients of the window and provide the vector as the input for the “window” argument.
Hope this helps!

  1 件のコメント

i am new to matlab, so i am not sure that I understand your reply. mscohere dont have time as an output

サインイン to comment.

Daniel M
Answer by Daniel M
on 24 Oct 2019

Have you looked at the MATLAB function mscohere?
Otherwise, you could try looking into this function in the spm12 toolbox: spm_eeg_ft_multitaper_coherence, found at

  0 件のコメント

サインイン to comment.

Translated by