Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

"fft method" for dataset II #63

Open
ShivaNaghsh opened this issue Nov 15, 2018 · 3 comments
Open

"fft method" for dataset II #63

ShivaNaghsh opened this issue Nov 15, 2018 · 3 comments

Comments

@ShivaNaghsh
Copy link

ShivaNaghsh commented Nov 15, 2018

Hi,
I am working with Dataset II, and I want to see "the effct of Stimulus frequency" on "each Trial" using "fft method" in MATLAB. I mean, I know the label of each Trial, so I know the stimulus frequency used, and I expect to see a significant Peak regarding "the effect of Stimulus frequency on the EEG signal of each Trial " on the "frequency plot" (for example: a peak on 10 Hz or 6.66 Hzz or ...); however, I can't see such a peak at all. I am wondering why I can't see such a peak!!!
The code I used to apply fft to signals of each trial is this:

close all;
lbl=sess.trials{1,55}.label; %oz num is 126
sig=sess.trials{1,55}.signal(126,:); %oz num is 126
fs = 250;
x = sig;
nfft = 2^( nextpow2(length(x)) );
df = fs/nfft;
f = 0:df:fs/2;
X = fft(x,nfft);
X = X(1:nfft/2+1);
plot(f,abs(X))
xlim([0 20]);

Thank you in advance for any help.
Best regards

@ShivaNaghsh
Copy link
Author

Dear @liarosge and @vangelis2015,
I have to work with fft methods to extract the frequency components of SSVEP for this stage of my project. I would really appreciate it if you guide me to solve my problem.

@ShivaNaghsh ShivaNaghsh changed the title using "fft method" for dataset II "fft method" for dataset II Nov 16, 2018
@vangelis2015
Copy link
Contributor

Hello,

In general it is difficult to see, by naked eye, the effect of stimulus frequency by adopting this simple approach. Perhaps in some trials and subjects, you can observe it.
You must not forgot that the EEG trials are noisy.
In the case that you need some trials where the effect can be observed by naked eye then i suggest to apply your fft procedure in all trials and choose the desired trials for further processing.
Also, since the SSVEP responses includes, also, multiples of frequency of the visual stimulus, i suggest to remove the last line of your program (ie. xlim). Finally, instead of using the fft function to find the spectrum you can use as an alternative the pwelch function.

@ShivaNaghsh
Copy link
Author

ShivaNaghsh commented Nov 16, 2018

@vangelis2015, Thank you for your response. I will consider the points you mentioned.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants