-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathload_medical_data.m
82 lines (81 loc) · 3.27 KB
/
load_medical_data.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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
sampleskept=60000;%no samples kept from original signal
[rawsignal1,beats1]=loadmedicalECG('16265m',nobeats,sampleskept,windowlength,1);
[rawsignal2,beats2]=loadmedicalECG('16272m',nobeats,90000,windowlength,1);
[rawsignal3,beats3]=loadmedicalECG('16273m',nobeats,sampleskept,windowlength,1);
[rawsignal4,beats4]=loadmedicalECG('16420m',nobeats,90000,windowlength,1);
[rawsignal5,beats5]=loadmedicalECG('16483m',nobeats,sampleskept,windowlength,1);
[rawsignal6,beats6]=loadmedicalECG('16539m',nobeats,80000,windowlength,1);
[rawsignal7,beats7]=loadmedicalECG('16773m',nobeats,80000,windowlength,1);
[rawsignal8,beats8]=loadmedicalECG('16786m',nobeats,sampleskept,windowlength,1);
[rawsignal9,beats9]=loadmedicalECG('16795m',nobeats,80000,windowlength,1);
[rawsignal10,beats10]=loadmedicalECG('17052m',nobeats,80000,windowlength,1);
[rawsignal11,beats11]=loadmedicalECG('17453m',nobeats,sampleskept,windowlength,1);
[rawsignal12,beats12]=loadmedicalECG('18177m',nobeats,sampleskept,windowlength,1);
[rawsignal13,beats13]=loadmedicalECG('18184m',nobeats,90000,windowlength,1);
[rawsignal14,beats14]=loadmedicalECG('19088m',nobeats,sampleskept,windowlength,10000);
[rawsignal15,beats15]=loadmedicalECG('19090m',nobeats,sampleskept,windowlength,10000);
[rawsignal16,beats16]=loadmedicalECG('19093m',nobeats,sampleskept,windowlength,10000);
[rawsignal17,beats17]=loadmedicalECG('19140m',nobeats,sampleskept,windowlength,10000);
[rawsignal18,beats18]=loadmedicalECG('19830m',nobeats,sampleskept,windowlength,2000000);
if ACF_on==1
%split rawsignals into fixed-length-windows
wsig1=window_function(rawsignal1,wlen);
wsig2=window_function(rawsignal2,wlen);
wsig3=window_function(rawsignal3,wlen);
wsig4=window_function(rawsignal4,wlen);
wsig5=window_function(rawsignal5,wlen);
wsig6=window_function(rawsignal6,wlen);
wsig7=window_function(rawsignal7,wlen);
wsig8=window_function(rawsignal8,wlen);
wsig9=window_function(rawsignal9,wlen);
wsig10=window_function(rawsignal10,wlen);
wsig11=window_function(rawsignal11,wlen);
wsig12=window_function(rawsignal12,wlen);
wsig13=window_function(rawsignal13,wlen);
wsig14=window_function(rawsignal14,wlen);
wsig15=window_function(rawsignal15,wlen);
wsig16=window_function(rawsignal16,wlen);
wsig17=window_function(rawsignal17,wlen);
wsig18=window_function(rawsignal18,wlen);
end
if ACF_on==0
% use raw data
r1=beats1';
r2=beats2';
r3=beats3';
r4=beats4';
r5=beats5';
r6=beats6';
r7=beats7';
r8=beats8';
r9=beats9';
r10=beats10';
r11=beats11';
r12=beats12';
r13=beats13';
r14=beats14';
r15=beats15';
r16=beats16';
r17=beats17';
r18=beats18';
else
%compute autocorrelation
r1=my_autocorr(wsig1);
r2=my_autocorr(wsig2);
r3=my_autocorr(wsig3);
r4=my_autocorr(wsig4);
r5=my_autocorr(wsig5);
r6=my_autocorr(wsig6);
r7=my_autocorr(wsig7);
r8=my_autocorr(wsig8);
r9=my_autocorr(wsig9);
r10=my_autocorr(wsig10);
r11=my_autocorr(wsig11);
r12=my_autocorr(wsig12);
r13=my_autocorr(wsig13);
r14=my_autocorr(wsig14);
r15=my_autocorr(wsig15);
r16=my_autocorr(wsig16);
r17=my_autocorr(wsig17);
r18=my_autocorr(wsig18);
end