⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 gaotong.m

📁 心电信号加入0.5Hz的基线漂移
💻 M
字号:
%z平面的简单零极点法设计高通滤波器
clear all;
load data.txt;
syms rad z hz hrad angle;
t=1:length(data);
data1=0.2*sin(0.25/pi*t)'+data;
Wh=0.8*pi;
a=cos(Wh)/(1+sin(Wh));
hz=(2/(1-a)*((1-1/z)/(1+a/z)));%数字滤波器的系统函数
% rad=0:0.1:3.3;
hrad=subs(hz,exp(i*rad/0.32));
subplot(211);
ezplot(abs(hrad));
axis([0 2 0 2]);
title('幅度特性曲线')
grid on;
subplot(212);
angle=atan(imag(hrad)/real(hrad));
ezplot(angle);
axis([0 2 -2 2]);
title('相位特性曲线');
grid on; 
b=1;
a=0.9752;
y=filter(b,a,data);
figure(2)
subplot(311)
plot(data);grid on
axis([0 1000 -1 1 ])
title('干净的原信号')
subplot(312)
plot(data1);grid on 
axis([0 1000 -1 1 ])
title('加基线漂移后的原信号')
subplot(313)
plot(y);grid on 
axis([0 1000 -1 1 ])
title('滤波后的信号')

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -