-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathf_load_data.m
More file actions
27 lines (19 loc) · 746 Bytes
/
f_load_data.m
File metadata and controls
27 lines (19 loc) · 746 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
function [structEEG, lst_changes] = f_load_data(...
fileName, filePath, dataType)
if strcmp(dataType,'.set')
[structEEG, lst_changes] = ...
pop_loadset('filename', fileName, ...
'filepath', filePath);
elseif strcmp(dataType,'.mff')
% mff folders contain various files
[structEEG, lst_changes] = ...
pop_mffimport([filePath, filesep, fileName], ...
{'classid' 'code' 'description' 'label' 'mffkey_cidx' ...
'mffkey_gidx' 'mffkeys' 'mffkeysbackup' 'relativebegintime' ...
'sourcedevice'});
elseif strcmp(dataType,'.cdt')
[structEEG, lst_changes] = ...
loadcurry([filePath, filesep, fileName], ...
'CurryLocations', 'False');
end
end