suggestions for running PSD and FFT

Post Reply
Faly.Golshan
Posts: 3
Joined: Wed Apr 21, 2021 3:09 pm

suggestions for running PSD and FFT

Post 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,
User avatar
James
Site Admin
Posts: 1103
Joined: Wed Jan 02, 2013 9:06 pm

Re: suggestions for running PSD and FFT

Post 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.
Faly.Golshan
Posts: 3
Joined: Wed Apr 21, 2021 3:09 pm

Re: suggestions for running PSD and FFT

Post 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?
User avatar
James
Site Admin
Posts: 1103
Joined: Wed Jan 02, 2013 9:06 pm

Re: suggestions for running PSD and FFT

Post 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 ;-)
Faly.Golshan
Posts: 3
Joined: Wed Apr 21, 2021 3:09 pm

Re: suggestions for running PSD and FFT

Post 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?
User avatar
James
Site Admin
Posts: 1103
Joined: Wed Jan 02, 2013 9:06 pm

Re: suggestions for running PSD and FFT

Post 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.
Post Reply