How can I do FFT of EEG

24 ビュー (過去 30 日間)
nazmican
nazmican 2022 年 12 月 22 日
回答済み: Sulaymon Eshkabilov 2022 年 12 月 23 日
この 質問 は Bora Eryilmaz さんによってフラグが設定されました
I am performing FFT on EEG data. My ultimate goal is to have a frequency by time plot. However, the range of frequencies should be from 0Hz to 70.87Hz. How can I limit these frequencies so that my results are in the correct range? Below is my code. My sampling rate is 2000Hz.
Now we want to visualize the frequency spectrum magnitude of one EEG_1 with respect to frequency for frequency range 0 - 70.87Hz
% First find the df, the frequency resolution of the signal, that is the frequency equivalent of a single point
% Using df how many frequency points do we need to show ? Create a frequency vector f for the x
% axis and spectrum absolute magnitude vector EEG_1_Spectrum for the y axis.
Nbin=
f=
EEG_1Spec=
%Create a new figure
figure;
%Plot the computed spectrum using the stem() function for thefrequency range 0 - 70.87Hz on top row of the figure.
subplot(2,1,1);
stem()
%put title , xlabel, ylabel,
% Repeat the above step for the VEPconvolved average signal.
% Can you use the same frequency vector for the x axis?
subplot(2,1,2);
VEPconvAveSpec=fft()
stem()
% put title, xlabel, ylabel
  1 件のコメント
nazmican
nazmican 2022 年 12 月 22 日
編集済み: nazmican 2022 年 12 月 22 日
%My code
Nbin=length(t) ;
df=fs/L ; %Frequency resolution
EEG_1Spec=0:70.87;
figure;
subplot(2,1,1);
stem(df,abs(EEG_1Spec));
plot(EEG_1Spec);
title('EEG_1Spec');
xlabel('frequency(Hz)');
ylabel('Amplitude(microV)');
subplot(2,1,2);
VEPconvAveSpec=fft(127); %Number of EEGdata/Gain=130048/1024
stem(VEPconvAveSpec);
plot(VEPconvAveSpec);
title('VEPconvAveSpec');
xlabel('frequency(Hz)');
ylabel('Amplitude(microV)');

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

回答 (1 件)

Sulaymon Eshkabilov
Sulaymon Eshkabilov 2022 年 12 月 23 日
If I have understood your question correctly, you want to put limitations along y-axis. If so, you can use one of these two options:
(1)
ylim([0, 70.87])
OR
(2)
axis([xmin xmas ymin ymax])

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by