bva_loadsubject

bva_loadsubject(varargin)

bva_loadsubject - load Brain Vision dataset of a subject

function [eeg meta] = bva_loadsubject(dataFile,headerFile,markerFile,stimCode,t0,t1 [,responseCode])

Read continuous Brain Vision header, marker and datafile and epochize data according to requested stimulus code. with a choose pre- & post-stimulus interval. A response code may also be given. If such a code is given all “incorrect trials” will be discarded and thecorresponding reaction times will be computed.

Input:

dataFile = cont. Brain Vision data (.mat Array [channel x time]) headerFile = Brain Vision Data Exchange Header File (.vhdr) markerFile = Brain Vision Data Exchange Marker File (.vmrk) stimCode = relevant trigger code (number) t0 = pre-stimulus interval t1 = post-stimulus interval response = correct response code (optional)

Output:

eeg = eeg-set (channel x time x trial) meta = struct containing sampling rate,timescale and electrode lables rt = reaction times - only if response given.

requires: bva_epoch.m, bva_readheader.m bva_readmarker.m

see also:ERRP/io