loading ECG signal and displaying it in time doman

102 visualizaciones (últimos 30 días)
Jeslin Joseph
Jeslin Joseph el 7 de Dic. de 2021
Comentada: Rena Berman el 23 de Ag. de 2022
An ECG signal has been measured and provided to you as a .mat file. a) Load this file to MATLAB and sketch it in time domain. b) Find the sampling time (𝑇𝑠) and then sampling frequency (𝐹𝑠) used for this signal. c) Sketch the magnitude spectrum of this signal. d) Observe the time and frequency domain plots you sketched and use filtering techniques to reduce the bias and noise of the measured signal. You are allowed to use several filters, but do not have to. e) Add figures and specifications of the filter(s) you designed and used. f) Sketch the filtered signal in time and frequency domains.
matname = 'noisyECGMiniProject3.mat';
D = load(matname);
EKG= D.EKG;
t = D.t';
Fs = D.Fs;
Ts = mean(diff(t));
Fsc = 1/Ts;
figure(1)
plot(t, EKG)
grid
Reference to non-existent field 'EKG'.
Error in part1mini (line 3)
EKG= D.EKG;
how do fix this
  2 comentarios
Rik
Rik el 17 de Dic. de 2021
loading ECG signal and displaying it in time doman
An ECG signal has been measured and provided to you as a .mat file. a) Load this file to MATLAB and sketch it in time domain. b) Find the sampling time (𝑇𝑠) and then sampling frequency (𝐹𝑠) used for this signal. c) Sketch the magnitude spectrum of this signal. d) Observe the time and frequency domain plots you sketched and use filtering techniques to reduce the bias and noise of the measured signal. You are allowed to use several filters, but do not have to. e) Add figures and specifications of the filter(s) you designed and used. f) Sketch the filtered signal in time and frequency domains.
matname = 'noisyECGMiniProject3.mat';
D = load(matname);
EKG= D.EKG;
t = D.t';
Fs = D.Fs;
Ts = mean(diff(t));
Fsc = 1/Ts;
figure(1)
plot(t, EKG)
grid
Reference to non-existent field 'EKG'.
Error in part1mini (line 3)
EKG= D.EKG;
how do fix this
Rena Berman
Rena Berman el 23 de Ag. de 2022
(Answers Dev) Restored edit

Iniciar sesión para comentar.

Respuestas (1)

Cris LaPierre
Cris LaPierre el 7 de Dic. de 2021
It would appear your mat file does not contain a variable named EKG. The fix is to use the actual name of the variable, or be sure to include a variable with that name in the mat file. Run the following code to see what variables are in your mat file.
D = load('noisyECGMiniProject3.mat');
who(D)

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by