-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkinem_cat_2task.m
37 lines (34 loc) · 1.28 KB
/
kinem_cat_2task.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
function kinem_cat_2task(stepNum,task1,task2,varargin)
p = path;
p1 = userpath;
p1(end) = [];
task1 = [upper(task1(1)) lower(task1(2:end))];
task2 = [upper(task2(1)) lower(task2(2:end))];
if nargin == 4
params = varargin{1};
end
% listFol = dir([p1 fileNames{i}]); % Capitalize first letter of task folders
% listFol(1:2) = [];
% for j=1:length(listFol)
% transname = [p1 fileNames{i} '\' listFol(j).name 't'];
% movefile([p1 fileNames{i} '\' listFol(j).name],transname);
% movefile(transname,[p1 fileNames{i} '\' upper(listFol(j).name(1)) lower(listFol(j).name(2:end))]);
% end
userpath([p1 '\' task1]);
if nargin == 3
[flatBins, badFlatBins, flatBinsStats,~,~,~,params2] = kinem_cat_1task(fileName, task1, stepNum);
elseif nargin == 4
[flatBins, badFlatBins, flatBinsStats,~,~,~,params2] = kinem_cat_1task('False',params);
end
path(p);
userpath([p1 '\' task2]);
if nargin == 3
[rockBins badRockBins rockBinsStats] = kinem_cat_1task(fileName, task2, stepNum);
elseif nargin == 4
[rockBins badRockBins rockBinsStats] = kinem_cat_1task('False',params);
end
[~, pv] = ttest2(flatBins, rockBins);
pv(:,1) = [];
flatBinsStats(end+1,:) = pv;
output_2task(flatBins,badFlatBins,flatBinsStats,rockBins,badRockBins,rockBinsStats,params2,task1,task2);
path(p);