フィルターのクリア

Make spectrogram of LFP using chronux package

19 ビュー (過去 30 日間)
Selena
Selena 2022 年 7 月 4 日
コメント済み: Bjorn Gustavsson 2022 年 7 月 5 日
Hello! I am trying to get a spectrogram of some LFP signals using the chronux package.
My current code is:
[S,t,f] = chronux.ct.mtspecgramc(data, [.4 .0005], params);
S = 10*log10(S);
imagesc(t,f,S)
Because the data is sleep LFP, I should be getting a spectrogram with red on the bottom throughout, but instead, it's looking like this:
Does anyone know what I am doing incorrectly?

採用された回答

Bjorn Gustavsson
Bjorn Gustavsson 2022 年 7 月 5 日
From the help of that function you will see that the output S should be:
0050 % S (spectrum in form time x frequency x channels/trials if trialave=0;
0051 % in the form time x frequency if trialave=1)
0052 % t (times)
0053 % f (frequencies)
0054 % Serr (error bars) only for err(1)>=1
Therefore the correcter way of displaying the spectrogram would be:
pcolor(t,f,S.'),shading flat,colorbar,xlabel('time'),ylabel('freq')
HTH
  2 件のコメント
Selena
Selena 2022 年 7 月 5 日
Thank you, it seems to be working now!
Bjorn Gustavsson
Bjorn Gustavsson 2022 年 7 月 5 日
My pleasure, happy that it helped.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeTime-Frequency Analysis についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by