您好我正在尝试从 EEG 耳机记录的 EDF 数据中绘制特定通道。目前它正在将所有通道绘制在一起,看起来非常混乱。
这是过滤和使用edfread获取edf数据的脚本
clc
clear all
close all
%Convert data from edf to Matlab
[header, data] = edfread('Subject2.edf');
hFs = 128; % half of sampling rate of Emotiv EEG
%design elliptic filter
Wp = [8/64 12/64]; %passband
Ws = [7/64 13/64]; %stopband
Rp = 1; %ripple in the pass band
Rs = 30; %stopband attenuation
[N, Wn] = ellipord(Wp, Ws, Rp, Rs);
[B, A] = ellip(N, Rp, Rs, Wp);
%averaging to remove common noise
for i=1:36
datan(i,:)=data(i,:)-mean(data);
end
%filtering of entire data into alpha band
data_alpha = filtfilt(B,A,datan);
这是使用edf read后EDF数据的代码,返回这个
header =
ver: 0
patientID: '2 '
recordID: '2 '
startdate: '14.07.16'
starttime: '04.41.41'
bytes: 9472
records: 1257
duration: 1
ns: 36
label: {1x36 cell}
transducer: {1x36 cell}
units: {1x36 cell}
physicalMin: [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]
physicalMax: [1x36 double]
digitalMin: [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]
digitalMax: [1x36 double]
prefilter: {1x36 cell}
samples: [1x36 double]
因此,当我使用 `plot(data_alpha) 时,我得到下面的图像,我相信它正在绘制所有通道。
我想绘制过滤后的“MARKER”数据,这是 edf 文件中的最后一个通道。我怎样才能做到这一点?