资源简介
脑电信号不同通道之间相位所定值,计算脑电不同电极之间的PLV
代码片段和文件信息
function [plv] = pn_eegPLV(eegData srate filtSpec dataSelectArr)
% Computes the Phase Locking Value (PLV) for an EEG dataset.
%
% Input parameters:
% eegData is a 3D matrix numChannels x numTimePoints x numTrials
% srate is the sampling rate of the EEG data
% filtSpec is the filter specification to filter the EEG signal in the
% desired frequency band of interest. It is a structure with two
% fields order and range.
% Range specifies the limits of the frequency
% band for example put filtSpec.range = [35 45] for gamma band.
% Specify the order of the FIR filter in filtSpec.order. A useful
% rule of thumb can be to include about 4 to 5 cycles of the desired
% signal. For example filtSpec.order = 50 for eeg data sampled at
% 500 Hz corresponds to 100 ms and contains ~4 cycles of gamma band
% (40 Hz).
% dataSelectArr (OPTIONAL) is a logical 2D matrix of size - numTrials x
% numConditions. For example if you have a 250 trials in your EEG
% dataset and the first 125 correspond to the ‘attend‘ condition and
% the last 125 correspond to the ‘ignore‘ condition then use
% dataSelectArr = [[true(125 1); false(125 1)]...
% [false(125 1); true(125 1)]];
%
% Output parameters:
% plv is a 4D matrix -
% numTimePoints x numChannels x numChannels x numConditions
% If ‘dataSelectArr‘ is not specified then it is assumed that there is
% only one condition and all trials belong to that condition.
%
%--------------------------------------------------------------------------
% Example: Consider a 28 channel EEG data sampled @ 500 Hz with 231 trials
% where each trial lasts for 2 seconds. You are required to plot the phase
% locking value in the gamma band between channels Fz (17) and Oz (20) for
% two conditions (say attend and ignore). Below is an example of how to
% use this function.
%
% eegData = rand(28 1000 231);
% srate = 500; %Hz
% filtSpec.order = 50;
% filtSpec.range = [35 45]; %Hz
% dataSelectArr = rand(231 1) >= 0.5; % attend trials
% dataSelectArr(: 2) = ~dataSelectArr(: 1); % ignore trials
% [plv] = pn_eegPLV(eegData srate filtSpec dataSelectArr);
% figure; plot((0:size(eegData 2)-1)/srate squeeze(plv(: 17 20 :)));
% xlabel(‘Time (s)‘); ylabel(‘Plase Locking Value‘);
%
% NOTE:
% As you have probably noticed in the plot from the above example the PLV
% between two random signals is spuriously large in the first 100 ms. While
% using FIR filtering and/or hilbert transform it is good practice to
% discard both ends of the signal (same number of samples as the order of
% the FIR filter or more).
%
% Also note that in order to extract the PLV between channels 17 and 20
% use plv(: 17 20 :) and NOT plv(: 20 17 :). The smaller channel
% number is to be used first.
%--------------------------------------------------------------------------
%
% Reference:
% Lachaux J P E Rodriguez J Martinerie and F J Varela.
%
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 1337 2011-08-16 10:49 license.txt
文件 4698 2011-05-29 03:59 pn_eegPLV.m
相关资源
- 自己采集的静息态脑电eeg数据64导
- OpenGL + freeglut + glew + glm 環境配置
- 非常强大的表格树TreeGrid[js版]
- 基于FPGA的jpeg压缩实现
- FreeGlut
- freeglut-3.0.0.
- 视听说工具
- eeglab ADJUST
- 实现TreeView和ListView合体效果的控件
- GLTools-Freeglut.zipopengl超级宝典V5
- EXTJS 4 树形表格组件使用
- 脑电数据批量绘图算法v3.0.zip
- ADJUST插件
- 国际10-20系统脑电极分布图Viso绘制
- iTextSharp.LGPLv2.Core的中文字体iTextAsia
- EEG信号特征提取与分类
- 树状表格TreeGridView自定义控件,源码
- 基于EEG的特征提取
- EEG脑地形图绘制程序
- EEG signal processing 脑电信号处理方法算
- beego完档.chm
- EEGLAB中的电极位置信息文件.rar
- freeglut 3.0.0编译好的库文件
- beego_api.chm
- freeGlut无需编译
评论
共有 条评论