-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathcreateTestingSet.m
More file actions
47 lines (46 loc) · 1.12 KB
/
createTestingSet.m
File metadata and controls
47 lines (46 loc) · 1.12 KB
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
function [] = createTestingSet()
file_positive = fopen('positive.txt','r+');
testingSet = fopen('testing.txt','w');
%her line bir yorum
line = fgetl(file_positive);
lineCount=0;
while ischar(line)
if lineCount < 511
lineCount=lineCount+1;
line=fgetl(file_positive);
continue;
else
if lineCount >= 511 && lineCount <= 730
fprintf(testingSet,'%s',char(line));
fprintf(testingSet,'\n');
line=fgetl(file_positive);
else
break;
end
lineCount=lineCount+1;
end
end
fclose(file_positive);
file_negative = fopen('negative.txt','r+');
%her line bir yorum
line = fgetl(file_negative);
lineCount=0;
while ischar(line)
if lineCount < 511
lineCount=lineCount+1;
line=fgetl(file_negative);
continue;
else
if lineCount >= 511 && lineCount <= 730
fprintf(testingSet,'%s',char(line));
fprintf(testingSet,'\n');
line=fgetl(file_negative);
else
break;
end
lineCount=lineCount+1;
end
end
fclose(file_negative);
fclose(testingSet);
end