-
Notifications
You must be signed in to change notification settings - Fork 7
/
getsubj2.asv
69 lines (68 loc) · 1.06 KB
/
getsubj2.asv
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
64
65
66
67
68
69
%function [P, Tc , targets] = getsubject(n,i)
clear all
n = 1;
if(n>5)
disp 'nonsense'
pause
end
load eegdata;
%% first
task1 = data{n}{4};
t = [];
for i = 1:1:5
t = [t ; task1(i,:)];
end
for i = 1:1:5
set{i} = reshape(t(i,:),100,25);
end
f1 = [];
for i =1:1:5
f1 =[f1; getfeatures(set{i})];
end
%% second
n= n +5;
task2 = data{n}{4};
t = [];
for i = 1:1:5
t = [t ; task2(i,:)];
end
for i = 1:1:5
set{i} = reshape(t(i,:),100,25);
end
f2 = [];
for i =1:1:5
f2 =[f2; getfeatures(set{i})];
end
%% third
% n= n +5;
task1 = data{n}{4};
t = [];
for i = 1:1:5
t = [t1 ; task1(i,:)];
end
for i = 1:1:5
set{i} = reshape(t(i,:),100,25);
end
f1 = []
for i =1:1:5
f1 =[f1; getfeatures(set{i})];
end
% n= n +5;
% task = data{n}{4};
% t = task(i,:);
% t = t(1:2500);
% set = reshape(t,100,25);
%
% f5 = getfeatures(set);
%
%
% t1 = [1 1 1 1 1];
% t2 = [2 2 2 2 2];
% t3 = [3 3 3 3 3];
% t4 = [4 4 4 4 4];
% t5 = [5 5 5 5 5];
% P = [f1 f2 f3 f4 f5]';
% %LVQ
% Tc = [t1 t1 t1 t1 t1 t2 t2 t2 t2 t2 t3 t3 t3 t3 t3 t4 t4 t4 t4 t4 t5 t5 t5 t5 t5]';
% T = ind2vec(Tc);
% targets = full(T);