フィルターのクリア

FFT with hanning window

66 ビュー (過去 30 日間)
Christine
Christine 2020 年 7 月 9 日
回答済み: Star Strider 2020 年 7 月 10 日
I've got EEG data that I would like to do a fourier transform. Ideally I would like to perform a fft for each epoch, then average them, but before I can get to that point, I keep getting this error: Undefined operator '.*' for input arguments of type 'struct' for this line: y_HannWnd = x.*hann(N).
Any suggestions?
EEG = pop_loadset('filename', [num2str(SubjectID{i}) '_ICA.set'], 'filepath', [CurrentDirectory 'Kid SL/Resting/Artifact Cleaned']);
x = EEG; %electrodes x samples x epochs (40x1024x111)
Fs = 512; % Sampling rate
N = 1024; % Length of signal
nfft = 2^nextpow2(N); % Transform length
y_HannWnd = x.*hann(N);
Ydft_HannWnd = fft(y_HannWnd,nfft)/N

回答 (1 件)

Star Strider
Star Strider 2020 年 7 月 10 日
I have no idea what ‘pop_loadset’ does, however it apparently returns ‘x’ as a structure. You will need to extract the information you want from it.
See: Access Data in Structure Array for details on how to work with it.

カテゴリ

Help Center および File ExchangeEEG/MEG/ECoG についてさらに検索

製品


リリース

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by