How to plot ECG and more...
22 次查看(过去 30 天)
显示 更早的评论
Hello, I have a lot of questions...My assignment is to plot ECG signal from .txt file.
After loading this file to MATLAB I can see, that in the first column is index of samples, the second and the third one are filled with ECG signal from two different samplings. I have to focus on the second column. So I do that:
x = load('c:/.../1.txt');
y = x(:, 2);
What should I do next? Becasue when I plot the 'y' it doesn't look right...I know that Fs for this ECG signal is 360Hz. Then I have to add a sinusoidal noise(50Hz) and try to use filters to clear signal.
I hope that somebody will help me...
0 个评论
采纳的回答
Rick Rosson
2012-1-3
1. Please try the following:
N = size(y,1);
Fs = 360;
dt = 1/Fs;
t = dt*(0:N-1)';
figure;
plot(t,y);
2. When you say "it doesn't look right", what specifically do you mean? What did you expect it to look like, and how does it differ from what you expected?
HTH.
Rick
1 个评论
Timothy Dixon
2012-5-19
Mr Rick, please i need your help, am working on a project to compare an ECG signal and EPsig signal. i could manage to generate and analyze the ECG signal but need help for matlab command for EPsig signal.
command needed: generating EPsig signal at a cut off frequency of 30Hz, add noise and use any filtering techniques
Thanks
更多回答(2 个)
Rick Rosson
2012-1-4
Hi Lukas,
- Please try using the Zoom tool from the figure window's toolbar to zoom in closer to the plot; I think you will see that it looks a lot more like an ECG when you zoom in to an appropriate scale than it does from the global view.
- It looks like there is a pretty significant distortion in the signal between t = 115 and t = 118. I would suggest that you discard the portion of the signal after t = 112 or so to eliminate the effect of this anomaly.
- Please try using the fft and fftshift functions to compute the Fourier spectrum, and then plot the magnitude response (using the abs function) versus frequency (in hertz). I think you will see that there is some low-frequency noise or interference superimposed on the signal-of-interest.
- If you have access to the Signal Processing Toolbox, you may want to create a High-Pass-Filter and then apply the filter to reduce the low-frequency noise.
HTH.
Rick
1 个评论
Muhammad Anas
2017-2-7
编辑:Muhammad Anas
2017-2-7
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 ECG / EKG 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!