I have a doubt with regards to mscohere function output in matlab. I have 64 channel EEG data to extract coherence data for. Which means I would need a 64x64 matrix output for a particular frequency band say 8 to 13 Hz. I went through the documentation of mscohere function sveral times. One thing that I saw was that mscohere Cxy part can either be a vector, matrix or 3-D array. When I use the following code to calculate coherence between just two channels, channel 20 and channel 50, I get a 501×1 single column vector:
ch1 = 20;
ch2 = 50;
window = 2*EEG.srate;
noverlap = 0;
nfft = window*2;
fs = EEG.srate;
[Cxy,F] = mscohere(EEG.data(ch1,:),EEG.data(ch2,:),window,noverlap,nfft,fs);
501×1 single column vector
Can someone explain this output to me? Are these coherence values between two channels at 501 different frequency points (I'm just guessing. Not sure!)? Also, how do I input the frequency band of my interest like 8-13 Hz and calculate coherence just for that? Are there more steps in calculating coherence in matlab? How do I get a single value (between 0 to 1) for channel 20 x channel 50 coherence for 8-13 Hz frequency band?
I hope my question makes sense. Please let me know if I need to explain anything further.