资源简介
EEG 读取的文件
代码片段和文件信息
%----------------------------------------------------------------------
%FileName: ReadEEG_vhdr.m
%FunctionName: ReadEEG_vhdr
%Usage: read .eeg and .vmrk file through reading .vhdr file
%Author: Chen Qian
%Date: 2018-01-08
%----------------------------------------------------------------------
function [Mat_rawconfig] = ReadEEG_vhdr( dir_path )
%ReadEEG_vhdr Summary of this function goes here
% vhdr format eeg signal read ---> eeg raw signal in Mat_raw vhdr info
% in config vmrk info in config.mark
% Detailed explanation goes here
% Read vhdr file to obtain the information of files
vhdr = dir([dir_path‘*.vhdr‘]);
vhdr_path = [dir_path vhdr.name];
fp = fopen(vhdr_path);
if fp == -1
error(‘ERR:ReadEEG_vhdr:FileNotReadable‘‘Couldn‘‘t read header file‘)
end
% read the whole file as one cell array
raw={};
while ~feof(fp)
raw = [raw; {fgetl(fp)}];
end
fclose(fp);
% Remove comments and empty lines
raw(strmatch(‘;‘ raw)) = [];
raw(cellfun(‘isempty‘ raw) == true) = [];
n_line = length(raw);
for i=1:n_line
if(strfind(raw{i}‘=‘))
S = regexp(raw(i)‘=‘‘split‘);
switch (S{1}{1})
case ‘DataFile‘
config.eegName = S{1}{2};
case ‘MarkerFile‘
config.markName = S{1}{2};
case ‘NumberOfChannels‘
config.Nchannel = str2num(S{1}{2});
case ‘DataPoints‘
config.DataPoints = str2num(S{1}{2});
case ‘SamplingInterval‘
config.SamplingInterval = str2num(S{1}{2});
config.SampleFrequency = 1000000/config.SamplingInterval;
case ‘BinaryFormat‘
config.BinaryFormat = S{1}{2};
end
end
end
%
相关资源
- MATLAB的EEG分类算法
- 基于MATLAB的脑电信号处理.pdf
- EEGLAB中文操作手册
- 基于Matlab的EEGLab工具包使用手册
- EEGLAB版本V13
- EEG脑电处理matlab工具包-eeglab
- EEG处理GUI.rar
- 对脑电信号使用小波分解技术重建
- EEG小波变换
- matlab eeg
- EEG SEMG 表面肌电信号与肢体运动直接
- FCM for EEG 模糊C均值脑电分类并使用了
- Epilepsy-EEG-report--- 在学习了数字信号处
- ica-matlab 脑电信号 分析 fast ica去噪
- cspnum1 csp算法
- EEG_WAVELET 用小波方法把脑电信号进行
- Fftfile-of-EEG 可以用FFT频谱对脑电信号
- EEG-power-spectrum-estimation- 本科毕业时做
评论
共有 条评论