-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathsampleDirect.m
executable file
·58 lines (50 loc) · 1.35 KB
/
sampleDirect.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
clear global
load /auto/k5/prenger/strflab/fakedata/sampledata_nonan.mat
%rmpath(genpath('/auto/k2/share/strflab')); % remove current STRF lab path
addpath(genpath('/auto/k2/share/strflabGO')); % add new STRF lab path
stimEst=x(1:900,:);
respEst=y(1:900);
stimVal=x(901:1000,:);
respVal=y(901:1000);
% Declaring global variables.
%-----------------------------------
global globDat; % Must declare the global variable globDat in all functions that will access stim and resp.
strfData(stimEst,respEst);
%Initialize strf
%--------------------------------------
strf=linInit(100,[0:4]);
options = trnDirectFit3;
options.time_lag_max = 4;
options.cacheDir = '/auto/fdata/pgill/first_cache_dir';
options.Tol_val = 0;
strf = 1;
datIdx = 2;
[strfTrained,options]=strfOpt(strf,datIdx,options);
% if ~exist('x','var')
% load fakedata/sampledata1.mat;
% end
% addpath('./lower_train');
% options.cacheDir = '/auto/fdata/pgill/first_cache_dir';% 'null'; %;
% options.Tol_val = .001;
% if exist('assign','var')
% options.assign = assign;
% end
%
% if exist('groups','var')
% options.assign = groups;
% end
% options.time_lag_min = 0;
% options.time_lag_max = 2;
%
% if exist('hashes','var')
% options.hashes = hashes;
% end
% stim = x';
% if exist('t','var')
% resp = t';
% else
% resp = y';
% end
%
%
% [strf, options] = trnDirectFit(stim, resp, options);