-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.m
63 lines (43 loc) · 1.25 KB
/
test.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
59
60
61
62
63
t = 0:0.01:20;
suma = 0;
%verificare semnale filtrate
for i = 1:90
sound = load(strcat('D:\LUCRU\FAQ\TS\tema1\ECG-DB\Person_', strcat(num2str(i), strcat('\','rec_1m.mat'))));
S = sound.val(2,:);
id = ecg_function(S,0);
if(i == id)
suma = suma + 1;
end
end
for i = 1:90
sound = load(strcat('D:\LUCRU\FAQ\TS\tema1\ECG-DB\Person_', strcat(num2str(i), strcat('\','rec_2m.mat'))));
S = sound.val(2,:);
id = ecg_function(S,1);
if(i == id)
suma = suma + 1;
end
end
disp('Procentaj semnale filtrate (raw = 0)');
x = suma * 100 / 180;
disp(x);
%verificare semnale nefiltrate
suma = 0;
for i = 1:90
sound = load(strcat('D:\LUCRU\FAQ\TS\tema1\ECG-DB\Person_', strcat(num2str(i), strcat('\','rec_1m.mat'))));
S = sound.val(1,:);
id = ecg_function(S,1);
if(i == id)
suma = suma + 1;
end
end
for i = 1:90
sound = load(strcat('D:\LUCRU\FAQ\TS\tema1\ECG-DB\Person_', strcat(num2str(i), strcat('\','rec_2m.mat'))));
S = sound.val(1,:);
id = ecg_function(S,1);
if(i == id)
suma = suma + 1;
end
end
disp('Procentaj sunete nefiltrate (raw =1)');
x = suma * 100 / 180;
disp(x);