Borrar filtros
Borrar filtros

How to plot ECG and more...

22 visualizaciones (últimos 30 días)
Lukas
Lukas el 3 de En. de 2012
Editada: Muhammad Anas el 7 de Feb. de 2017
Hello, I have a lot of questions...My assignment is to plot ECG signal from .txt file.
Here is a link to this file: http://www.megaupload.com/?d=OME7EJB0
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...

Respuesta aceptada

Rick Rosson
Rick Rosson el 3 de En. de 2012
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 comentario
Timothy Dixon
Timothy Dixon el 19 de Mayo de 2012
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

Iniciar sesión para comentar.

Más respuestas (2)

Lukas
Lukas el 4 de En. de 2012
Thank you for your response! I do what you write and now the plot looks like this -> http://img842.imageshack.us/img842/9771/ecgg.jpg I don't think this is a properly look of ECG signal...What should I do next?

Rick Rosson
Rick Rosson el 4 de En. de 2012
Hi Lukas,
  1. 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.
  2. 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.
  3. 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.
  4. 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 comentario
Muhammad Anas
Muhammad Anas el 7 de Feb. de 2017
Editada: Muhammad Anas el 7 de Feb. de 2017
Hi Mr Rick, I am working on an ECG. The machines gives this waveform. But When I plot raw data it gives this kind of waveform
Kindly tell me how to overcome this problem. Sample Rate : 240 HZ Thanks in advance Muhammad Anas

Iniciar sesión para comentar.

Categorías

Más información sobre ECG / EKG en Help Center y File Exchange.

Productos

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by