-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathaddData.m
More file actions
executable file
·44 lines (33 loc) · 827 Bytes
/
addData.m
File metadata and controls
executable file
·44 lines (33 loc) · 827 Bytes
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
% Adds N sets of 5 random cards to the dataset
% Requires handIdentify.m
% Created by: Kavi, Gautam, Veena
function addData
col = 100;
row = 52;
data = zeros([row,col]); %52x10000
patches = zeros([10,col]);
for i = 1:col
a = randperm(52,5);
for j = 1:5
data(a(j),i) = 1;
end
end
for j = 1:col
count = 1;
for i = 1:row
if(data(i,j) == 1)
S = ceil(i/13); %that gives me the suit number :)
if(mod(i,13) == 0)
C = 13;
else C = mod(i,13);
end
patches(count,j) = S;
patches(count+1,j) = C;
count = count+2;
end
end
end
hands = handIdentify(patches);
patches = vertcat(patches,hands);
dlmwrite('more_data_poker_200.txt', patches, ',');
end