Window and overlap size question with coherence and mscohere
4 views (last 30 days)
Show older comments
Hi,
I've look at a few other posts regarding this question but i wanted to double check that my settings are correct.
From what I read on this forum I gather that the window size will adjust the frequency resolution of my coherence. Low resolution = small windows and accuracy of results are better with small windows as well.
Also the window size should be related to the sample rate in order to target a specific frequency range. The relationship may look something like this, but I'm not sure e.g. sample_rate/window_size = expected frequency range of data.
So here are my settings:
Data is from an intentional coordination task so I would expect relatively good level of coherence (around 0.7) at frequencies ranging from 0.5 - 1 Hz, which is the range of frequencies that the stimuli in my experiment were presented at for the synchronisation task.
data_length = 3000;
sample_rate = 100;
window = 200; (Expecting frequencies between 0.5 - 1 Hz, 100/200 = 0.5)
overlap = 100; (overlap of 50%)
L = length(data)
nfft = 2^nextpow2(L);
[CSC, f] = mscohere(x,y,window,overlap,nfft, sample_rate);
If anyone could let me know if this looks correct I would greatly appreciate it.
thanks,
Alan
0 Comments
Answers (0)
See Also
Categories
Find more on Specifying Target for Graphics Output in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!