Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion fileio/file_readBV.m
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,17 @@
% 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);
cnt.yUnit= hdr{filePos}.unit;
if isfield(hdr{filePos},'unit')
cnt.yUnit= hdr{filePos}.unit;
end
if isfield(hdr{filePos},'unitOfClab')
cnt.yUnit= hdr{filePos}.unitOfClab;
end

if ~isfield(cnt, 'yUnit')
ME = MException('InvalidUnits','Could not read units of the channels from the header file');
throw(ME);
end

%% Markers
if nargout>1,
Expand Down