Help understanding FFT plot
Show older comments
Hello, I'm hoping someone might be able to help me understand what my plot means. I need to conduct an FFT and PSD for some EEG data. The sample rate is 512 and I am currently using 2 seconds worth of data. I have been given the following code
subplot (2,1,1); plot (F4, 'k'); title ('Original F4 Signal')
duration =2;
samples = 1024; %sample rate 1024Hz for all patients except Patient 2 (512Hz)
samplingInterval = duration/samples;
bandwidth = 70;
time = linspace (0, duration, samples);
freq = linspace (-bandwidth, bandwidth, 1024);
% freq = linspace (-1.0e3, 1.0e3, 500);alternative baseline
fourierSpace = fftshift(ifft(F4));
subplot (2,1,2); plot (freq, abs(fourierSpace),'k'); title ('frequency')
I set the bandwidth at 70 as the high frequency filter was 70 during recording. F4 is simply the name of the channel that I am analysing. All other information in the code is as it was given to me.
When I run the code on the data the plot looks like this:

The PSD code I've been given is
% For EEG
t = linspace (0, 2, 1024);
x = F4;
h = spectrum.periodogram('Rectangular');% Or Blackman-Harris
%h = spectrum.periodogram('Blackman-Harris');% Or Rectangular
hopts = psdopts(h,x); % Default options based on the signal x
set(hopts,'Fs',1/(t(2)-t(1)),'SpectrumType','twosided','CenterDC',true);
psd(h,x,hopts)
The plot comes out like this:

If anyone can help me shed a little light on what all of this means I'd be eternally grateful! Apologies for such basic questions.... I'm very new to this!
Accepted Answer
More Answers (0)
Categories
Find more on Parametric Spectral Estimation in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!