问题描述
我已经从NEXUS 10 mark 2设备上获取了5分钟的原始eeg,并且在matlab中将其输出为1 x 76800行向量.据我了解,选择的采样频率为256 hz,因此它给了我总共76800个采样点.在此原始eeg信号上执行N点FFT无需花钱.由于N只能是2的幂,所以我从原始鸡蛋中提取了65536(2 ^ 16)个采样点,即从76800个点中提取了65536个点.现在我无法对该向量执行fft(65536个采样点)请任何人都可以指导..因为我是初学者..到目前为止,我已经尝试过 x=raw(1,1:65536); %raw eeg contain 76800 points , 65536 points are taken
from this
N=length(x);
fs=256;
ts=1/fs;
tmax=(N-1)*ts;
t=0:ts:tmax;
plot(t,x); % plot time domain
f=-fs/2:fs/(N-1):fs/2;
fftval=fft(x);
plot(f,ffval); % plot freq domain
我不知道所遵循的步骤是否正确.....我无法从我所经历的stackoverflow的许多帖子中了解..请帮助..我不愿意使用EEGLAB,因为很多帖子.请帮助
我认为代码可能是这样的:
load('eeg_4m.mat')
fs=2048;
x=val(1,:);
N=length(x);
ts=1/fs;
tmax=(N-1)*ts;
t=0:ts:tmax;
plot(t,x); % plot time domain
nfft = 2^( nextpow2(length(x)) );
df = fs/nfft;
f = 0:df:fs/2;
X = fft(x,nfft);
X = X(1:nfft/2+1);
figure; plot(f,abs(X)); axis([0,50,0,10e6]); % plot freq domain
i have acquired a 5 minutes raw eeg from NEXUS 10 mark 2 equipment and it is giving me output in the matlab as 1 x 76800 row vector. as i understand , the sampling frequency choosen is 256 hz , hence it is giving me total 76800 sampling points. no wat i m perfoming N point FFT on this raw eeg signal. since N can only be power of 2 i am EXTRACTING 65536(2 ^16) SAMPLING POINTS FROM RAW EGG i.e. from 76800 points i have taken 65536. now i am not able to perform fft on the this vector (65536 sampling points)please anybody can guide..as i am a beginner..i have tried dis so far
x=raw(1,1:65536); %raw eeg contain 76800 points , 65536 points are taken
from this
N=length(x);
fs=256;
ts=1/fs;
tmax=(N-1)*ts;
t=0:ts:tmax;
plot(t,x); % plot time domain
f=-fs/2:fs/(N-1):fs/2;
fftval=fft(x);
plot(f,ffval); % plot freq domain
i do not know whether the steps followed are right or not.....m not able to understand from many post in stackoverflow i have gone through..please help..I DONT WANT TO USE EEGLAB AS GIVEN IN MANY POSTS.PLEASE HELP
I think the code could be like this:
load('eeg_4m.mat')
fs=2048;
x=val(1,:);
N=length(x);
ts=1/fs;
tmax=(N-1)*ts;
t=0:ts:tmax;
plot(t,x); % plot time domain
nfft = 2^( nextpow2(length(x)) );
df = fs/nfft;
f = 0:df:fs/2;
X = fft(x,nfft);
X = X(1:nfft/2+1);
figure; plot(f,abs(X)); axis([0,50,0,10e6]); % plot freq domain
这篇关于使用MATLAB在EEG信号上执行FFT的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!