-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmake_mv_file.m
63 lines (57 loc) · 2.79 KB
/
make_mv_file.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
localisations = {'_HG', '_TG'};
conds = {'0-2', '0-4', '0-8', '2', '4','8'};
%for v = 1:length(conds)
subject = '348';
fname = ['C:\Users\Alicja\Desktop\Newcastle\', '348', '\', '_HG', '\coh-', '2', '.mat']; %path
chans = 12;% channels
ntrls = 75; % number of trials
fsamp = 1000; % sampling frequency
fend = 100; % max frequency
pord = 0; % model order 0 - estimate
format = 6; %MAT file
trial_mode = 0; % 0 == multitrial; 1 == trial-by-trial
chansel = '109,115,120';
descfil = ['C:\Users\Alicja\Desktop\Newcastle\',subject,'\',localisations(1),'ChanNums.txt'];
winlen = 100; %window length []
winshf = 20; %window shift 0
winnum = []; %number of windows #unobligatory
baseln = 0; %estimate baseline
bootst = 1; %run bootstrap
siglev = 2; %significance level 1 = .99; 2 = .95; 3 = .9; 4 = .75;
norm2 = 0; %ensemble mean
mv = struct(...
'fname',fname,'chans',chans,'recl',[],'ntrls',ntrls,'fsamp',fsamp,'fstart',0,'fend',fend,...
'pord',pord,'method',1,'format',format,'trial_mode',trial_mode,...
'chansel',chansel,...
'descfil',descfil,...
'winlen',winlen,'winshf',winshf,'winnum',winnum,...
'norm0',1,'norm1',0,'norm2',norm2,...
'baseln',baseln,'bootst',bootst,'siglev',siglev,'basenum',100,'bootpool',200,'bootnum',100,...
'pDTF',1,'pNDTF',1,'pSpect',0,'pCohs',0,'pdDTF',0,'pPDC',0,'pffDTF',0,...
'sDTF',1,'sNDTF',1,'sSpect',0,'sCohs',0,'sdDTF',0,'sPDC',0,'sffDTF',0,...
'sAR',0,'savefigs',1,...
'userange',0,'timerangestart',0,'timerangeend',0,'pautoflag',0,...
'incl_instant',0);
clearvars -except mv veps
global FRQPMAX % number of points in frequency domain
global FVL FVS
FRQPMAX = 100;
FVL = { struct('f',@liczSpectrum,'sx','_spec','tt','Power spectrum','hn','pSpect'),...
struct('f',@liczCohs,'sx','_cohs','tt','Coherences','hn','pCohs'),...
struct('f',@liczDTF,'sx','_DTF','tt','Normalized DTF','hn','pDTF'),...
struct('f',@liczNDTF,'sx','_NDTF','tt','Non-normalized DTF','hn','pNDTF'),...
struct('f',@liczdDTF,'sx','_dDTF','tt','Direct DTF','hn','pdDTF'),...
struct('f',@liczPDC,'sx','_PDC','tt','Partial directed coherence','hn','pPDC'),...
struct('f',@liczffDTF,'sx','_ffDTF','tt','Full frequency DTF','hn','pffDTF'),...
};
FVS = { struct('f',@podajSpectrum,'vn','spectrum'),...
struct('f',@podajCohs,'vn','cohs'),...
struct('f',@liczDTF,'vn','DTF'),...
struct('f',@liczNDTF,'vn','NDTF'),...
struct('f',@liczdDTF,'vn','dDTF'),...
struct('f',@liczPDC,'vn','PDC'),...
struct('f',@liczffDTF,'vn','ffDTF'),...
struct('f',@podajAR,'vn','AR_A_H'),...
};
multar1m(mv)
%end