📄 ecg.asv
字号:
clear all;
close all;
load ecgdata105.txt;
points=length(ecgdata105);% 数据总长;
grid on;
axis tight;
axis([1,points,-2,5]);
y=ecgdata105(:,1);
n=(0:0.004:points);
y=y(1:1:points);
n=n(1:1:points);
plot(n,y);
title('原始ECG信号');
%figure,subplot(3,1,1);
plot(n,y);
title('原始心电信号');
wn=0.3;
N=3;
[b,a]=butter(N,wn,'low');
m=filter(b,a,y);
%subplot(3,1,2)
figure,plot(n,m);
title('巴特沃思滤波');% 巴特沃斯滤波器是电子滤波器的一种。巴特沃斯滤波器的特点是通频带的频率响应曲线最平滑。这种滤波器最先由英国工程师斯替芬•巴特沃斯(Stephen Butterworth)在1930年发表在英国《无线电工程》期刊的一篇论文中提出的。
%巴特沃斯滤波器的特性
%巴特沃斯滤波器的特点是通频带内的频率响应曲线最大限度平坦,没有起伏,而在阻频带则逐渐下降为零。 在振幅的对数对角频率的波得图上,从某一边界角频率开始,振幅随着角频率的增加而逐步减少,趋向负无穷大
[c,l]=wavedec(m,2,'rbio6.8');
a4=wrcoef('a',c,l,'rbio6.8',2);
%subplot(3,1,3)
figure,plot(n,a4);
title('小波滤波');%去噪
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -