Azzera filtri
Azzera filtri

How to plot ECG and more...

22 visualizzazioni (ultimi 30 giorni)
Lukas
Lukas il 3 Gen 2012
Modificato: Muhammad Anas il 7 Feb 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...

Risposta accettata

Rick Rosson
Rick Rosson il 3 Gen 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 Commento
Timothy Dixon
Timothy Dixon il 19 Mag 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

Accedi per commentare.

Più risposte (2)

Lukas
Lukas il 4 Gen 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 il 4 Gen 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 Commento
Muhammad Anas
Muhammad Anas il 7 Feb 2017
Modificato: Muhammad Anas il 7 Feb 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

Accedi per commentare.

Categorie

Scopri di più su ECG / EKG in Help Center e File Exchange

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by