-
Notifications
You must be signed in to change notification settings - Fork 0
/
wavelet29_rec1.m
58 lines (48 loc) · 1018 Bytes
/
wavelet29_rec1.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
clc; clear all; close all;
load('rec_1m.mat');
x=val(1,:);
ecg=x';
figure(1);
plot(ecg); grid on;
title('ecg wave'); xlabel('time (msec)'); ylabel('amplitude(mV)');
hold on;
f2=zeros(1,2160);
Fc=10;
Fb=8;
M=500;
t = -10:1:10;
a = sqrt(Fb).*sinc(Fb*10*t/M);
b = sqrt(-Fb).*sinc(Fb*10*t/M);
c=a+b;
for i=0:293:4000
f1=(10*t);
f2=(15*c)+94;
f1=f1+i+370;
plot(f1,f2,'k-');grid on;
hold on;
end
title('template ecg'); xlabel('time (msec)'); ylabel('amplitude(mV)');
g2=zeros(1,4000);
Fc=10;
Fb=8;
M=500;
t = -10:1:10;
a1 = sqrt(Fb).*sinc(Fb*10*t/M);
b1 = sqrt(-Fb).*sinc(Fb*10*t/M);
c1=a1+b1;
for i=0:293:4000
g1=(0.4*t);
g2=(15*c1)+95;
g1=g1+i+370;
plot(g1,g2,'r-');grid on;
hold on;
end
title('template ecg'); xlabel('time (msec)'); ylabel('amplitude(mV)');
%
% for i=0:100:10000
% plot(f2(i));
% hold on;
% plot(g2(i));
% hold on;
% end;
%