How to plot ECG and more...
22 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commenti
Risposta accettata
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
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
Più risposte (2)
Rick Rosson
il 4 Gen 2012
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 Commento
Muhammad Anas
il 7 Feb 2017
Modificato: Muhammad Anas
il 7 Feb 2017
Vedere anche
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!