-
Notifications
You must be signed in to change notification settings - Fork 1
/
FieldTrip1.m
63 lines (52 loc) · 1.27 KB
/
FieldTrip1.m
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
%%
restoredefaultpath
addpath /home/raquib/Documents/MATLAB/fieldtrip-20191025
% addpath /home/raquib/Documents/MATLAB/eeglab2019_0
ft_defaults
%%
filename = '/home/raquib/Desktop/workspaces/mep-classification/data/original/sub03/exp01/eeg/SP 110RMT r2/raw.set';
hdr = ft_read_header( filename );
data = ft_read_data( filename, 'header', hdr);
events = ft_read_event( filename, 'header', hdr );
%%
cfg = [];
cfg.viewmode = 'vertical';
ft_databrowser(cfg, data);
%%
cfg = []
cfg.channel = 'all'
cfg.chantype = hdr.chantype
cfg.trials = 'all'
cfg.demean = 'yes';
cfg.baselinewindow = [-1 0];
cfg.lpfilter = 'yes';
cfg.lpfreq = 100;
trialdata = ft_preprocessing(cfg, data);
%%
cfg = [];
cfg.dataset = filename;
cfg.channel = 'all';
cfg.preproc.demean = 'yes';
cfg.viewmode = 'vertical';
ft_databrowser(cfg);
%%
cfg = []
cfg.datafile = filename
cfg.headerfile = filename
[data] = ft_preprocessing(cfg)
%%
neighbours(1).label = 'C3';
neighbours(1).neighblabel = {'FC1', 'CP1', 'FC5', 'CP5'};
neighbours(2).label = 'C4';
neighbours(2).neighblabel = {'FC2', 'CP2', 'FC6', 'CP6'};
cfg = []
cfg.method = 'hjorth'
cfg.elec = hdr.elec
cfg.trials = 'all'
cfg.feedback = 'gui'
cfg.neighbours = neighbours
dt2 = ft_scalpcurrentdensity(cfg, data)
%%
cfg = [];
cfg.channel = 'C3';
ft_databrowser(cfg, data)