fft function error while extracting EEG signals in EDF file

3 ビュー (過去 30 日間)
Jessica
Jessica 2022 年 8 月 12 日
コメント済み: Star Strider 2022 年 8 月 22 日
I want to extract different waves in EEG signals and quantilize their absolute power. However, some errors impeded my way of further exploration.
[header,data] = edfread("preprocessedEEG.edf");
S = data;
y=fft(S);
Then, an error came as "Error using fft Invalid data type. First argument must be double, single, int8, uint8, int16, uint16, int32, uint32, or logical."
Totally have no idea of the error. Is that because of my EDF file had some "NaN" data? or I just misused the fft function? How can I move on my analysing? I really need your help.

採用された回答

Star Strider
Star Strider 2022 年 8 月 12 日
According to the edfread documentation, the ‘data’ are the first output, not the second.
The assignments should probably be:
[data,header] = edfread("preprocessedEEG.edf");
instead. (I cannot test this since I do not have the file.)
.
  25 件のコメント
Jessica
Jessica 2022 年 8 月 22 日
Thanks, Strider! It really helps! The different windowed fft figures are as follow. And I decide to adopt hann/hanning window since it is reccommended by many people and articles.
Star Strider
Star Strider 2022 年 8 月 22 日
As always, my pleasure!

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

その他の回答 (0 件)

カテゴリ

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

製品


リリース

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by