资源简介
国外网站下载的MATLAB心电图去噪程序,有图和文章
代码片段和文件信息
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Isfahan University
%Mehdi Nasri
%june 2003
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
beepbeepclearclcclose all
disp(‘DSP Project ‘);
str=datestr(now‘dd-mmm-yyyy HH:MM:SS‘0);
disp(str);
disp(‘Executing program .... ‘);
count=3000;
load x_100 ;%The ECG data MAT file
END=length(sig);
x=sig(1:end1); %Time
y=sig(1:end2); %ECG data #1
z=sig(1:end3); %ECG data #2
count=4000;
y2=y ;%temp variable
temp=y;
disp(‘%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%‘)
TS=x(2)-x(1)Freq=1/TS
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%DCT Compression
%
disp(‘%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%‘)
disp(‘DCT Compression‘);
scrsz = get(0‘ScreenSize‘);
figure(‘MenuBar‘‘none‘‘Name‘‘DCT Compression ‘...
‘Numbertitle‘‘off‘‘Position‘[1 1 800 600])
subplot(511)plot(x(1:count)y(1:count))axis([0 12 4 6.5]) title(‘DCT Compression‘); %Plot base ECG signal
dcty=dct(y); %Discrete Cosin Transform of ECG
subplot(512)stem(dcty) axis([0 3000 -2 2]) ; %Plot DCT
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
counterB_DCT=0;
for index=1:1:END
if (dcty(index)~=0)
counterB_DCT=counterB_DCT+1;
end
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
dcty1=dcty;
for index = 1:1:END
if (dcty(index)<.22)&(dcty(index)>-0.22)
dcty1(index)=0;
end
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
counterA_DCT=0;
for index1=1:1:END
if (dcty1(index1)~=0)
counterA_DCT=counterA_DCT+1;
end
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%CounterA:Data Not ZERO after Compression
%CounterB:Data Not ZERO befor Compression
%CounterA-CounterB :Data set to Zero in COmpression Process
CompRatio_DCT=( (counterB_DCT-counterA_DCT)/counterB_DCT)*100
subplot(513)stem(dcty1) axis([0 3000 -2 2]);
aftercomp_DCT=idct(dcty1);
subplot(514)plot(x(1:count)aftercomp_DCT(1:count))axis([0 12 4 6.5])
error_DCT=y-aftercomp_DCT;
PRD_DCT=sqrt(sum(error_DCT.^2)/sum(y.^2))*100
subplot(515)plot(error_DCT)pause(5)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%FFT Comperession
disp(‘%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%‘)
disp(‘FFT Compression .‘);
figure(‘MenuBar‘‘none‘‘Name‘‘FFT Compression ‘...
‘Numbertitle‘‘off‘‘Position‘[1 1 800 600])
subplot(511)plot(x(1:count)y(1:count))axis([0 12 4 6.5])title(‘FFT Compression‘); %Plot base ECG signal
ffty=fft(y); %FFT Transform of ECG
subplot(512)stem(abs(
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 682583 2003-06-21 21:43 ecg\DSPecg\1.pdf
文件 10860 2003-06-25 20:20 ecg\DSPecg\CompFinal.m
文件 733 2011-04-28 18:42 ecg\DSPecg\esg_dsp.asv
文件 1184 2011-04-28 18:46 ecg\DSPecg\esg_dsp.m
文件 240184 2001-05-14 16:43 ecg\DSPecg\X_100.MAT
目录 0 2011-04-28 18:37 ecg\DSPecg
目录 0 2011-04-27 21:58 ecg
----------- --------- ---------- ----- ----
935544 7
相关资源
- lms自适应滤波算法提取胎儿心电matl
- MIT-BIH ECG 心电数据+matlab绘图详解
- rddata.m -- MIT-BIH ECG 信号的数据读取M
- ECG数据库MIT-BIH库读取识别R点
- 模拟ECG心电信号数据matlab
- matlab开发-使用xFoiland ParseCGeometric参数
- MIT数据库的心电信号预处理matlab程序
- 心电信号原始数据
- 检测ECG信号的R波
- 计算脉搏信号的方法 PPG (Blood Puls
- 心电信号(ECG)处理
- rdmat函数,可读取心电数据生成ECG心电
- jeecgboot实战入门教程 14讲笔记.md
- ECG信号的读取与QRS波检测
- ECG特征提取
- ECG心电信号matlab仿真画图
- ECG-rpeakdetect 心电信号R波检测
- Matlab-ECG-Processing 非常实用的基于Mat
- ECG (1)设计滤波器
- ecg_mairui 迈瑞杯医疗仪器设计大赛EC
- MATLAB,ECG,去噪,小波
评论
共有 条评论