フィルターのクリア

How to decide the window, nfft and noverlap for mscohere function?

8 ビュー (過去 30 日間)
baba
baba 2016 年 8 月 3 日
回答済み: André Lopes Brum 2018 年 12 月 20 日
Hi all,
I am trying to use mscohere to calculate coherence for two time signals each 300 ms long with 1000 Hz sampling rate so total number of samples = 300. Could you please help me to figure out how to decide the Window, nfft and noverlap for using mscohere?
Thanks a lot!
  1 件のコメント
baba
baba 2016 年 8 月 3 日
I am trying to calculate coherence for a band of frequencies, for ex. 8-15 Hz.

サインインしてコメントする。

回答 (1 件)

André Lopes Brum
André Lopes Brum 2018 年 12 月 20 日
d=4; % i got this 4 from a book, but i also saw some people using 8 instead
nfft=(nextpow2(length(x)/d))-1; nfft=2^nfft;
overlap = nttf/2;
window = hanning(nfft); % hanning is default
if you want to calculate the frequency of 15 Hz, you may need to rearrange your data, by setting:
F1= 15; % frequency that i wanna know
fs=F1/nfft;
and now interpolate your data with the new frequency sample, so the result of the mscohere.m will show you the frequency that you want to study.

カテゴリ

Help Center および File ExchangeMathematics についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by