Skip to content

Commit

Permalink
added reading of unit from header
Browse files Browse the repository at this point in the history
  • Loading branch information
BenjaminBlankertz committed Feb 17, 2014
1 parent 50789f7 commit 357bb12
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions fileio/file_readBV.m
Original file line number Diff line number Diff line change
Expand Up @@ -333,8 +333,10 @@
read_opt.filt_subsample = opt.SubsampleFcn;
end

read_hdr = struct('fs',hdr{filePos}.fs,'nChans',hdr{filePos}.NumberOfChannels,...
'scale',hdr{filePos}.scale,'endian',hdr{filePos}.endian, ...
read_hdr = struct('fs',hdr{filePos}.fs, ...
'nChans',hdr{filePos}.NumberOfChannels, ...
'scale',hdr{filePos}.scale, ...
'endian',hdr{filePos}.endian, ...
'BinaryFormat',readbv_binformat(filePos));

% get the position for the data in the whole data set
Expand All @@ -359,7 +361,8 @@

% read the data, read_bv will set the data in cnt.x because of the
% read_opt.data options
read_bv([fileNames{filePos} '.eeg'],read_hdr,read_opt);
read_bv([fileNames{filePos} '.eeg'], read_hdr, read_opt);
cnt.yUnit= hdr{filePos}.unit;

%% Markers
if nargout>1,
Expand Down

0 comments on commit 357bb12

Please sign in to comment.