Page 1 of 1
suggestions for running PSD and FFT
Posted: Wed Apr 21, 2021 7:29 pm
by Faly.Golshan
I'm trying to run PSD on the EEG data that I have collected in csv. format. Is there already a MATLAB script for running FFT or PSD based on the raw EEG we collect from Mind Monitor?
also I tried the MATLAB scripts you had shared on but there seems to be an error for function definitions. Just double checking if there is any other notes to consider before running them.
Thanks in advance,
Re: suggestions for running PSD and FFT
Posted: Wed Apr 21, 2021 8:29 pm
by James
My scripts just import the data, they don't do FFT.
If they're not working, make sure you're running an up to date version of MATLAB.
Re: suggestions for running PSD and FFT
Posted: Thu Apr 22, 2021 12:53 am
by Faly.Golshan
Thanks for the quick response James, I'm quite unfamiliar with OSC and I don't even know if I can access that anymore . Do you have any suggestions for how I can reach the PSD and FFT in other forms?
Re: suggestions for running PSD and FFT
Posted: Thu Apr 22, 2021 10:02 am
by James
The MATLAB import script on the website will get all the RAW EEG data from your recorded CSV file into MATLAB:
https://mind-monitor.com/FAQ.php#matlab
It does not perform the FFT for you, but it gives you all the data you need to be able to do it yourself.
You can find out how to do an FFT in MATLAB on the MATLAB website here:
https://www.mathworks.com/help/matlab/ref/fft.html
Regarding the data; by default the app is set to record at 1Hz. Most meditators are only interested in graphing their Alpha waves over a ~30 minute session and for this reason the defaults for recording at 1Hz data. If you want to do your own FFT analysis of the RAW EEG, then you should set the "Recording Interval" to "Constant" and this will give you 256Hz RAW EEG.
If you're only planning on looking at the pre-calculated brainwaves, then you do not need to do your own FFT and can leave it on the 1Hz default setting as it makes the files 256 times smaller
Re: suggestions for running PSD and FFT
Posted: Fri Apr 23, 2021 5:34 pm
by Faly.Golshan
Fair suggestions with FFT James!
You see, I'm planning to compare the baseline performance and post-intervention practice of two groups, and I wonder which way shows me more significant and clear difference among groups. For now I guess the absolute brainwaves are good enough, but I think adding a normalized time-frequency domain plot would be a nice addition. How can I display the data as a spectrogram plot?
Re: suggestions for running PSD and FFT
Posted: Sat Apr 24, 2021 10:53 am
by James
Faly.Golshan wrote: ↑Fri Apr 23, 2021 5:34 pm
How can I display the data as a spectrogram plot?
That's a MATLAB question which would need to be answered by a MATLAB expert, which I unfortunately am not! I would lookup this on the MATLAB forums.