필터 지우기
필터 지우기

Resample frequency of an ECG signal

조회 수: 7 (최근 30일)
sania urooj
sania urooj 2021년 2월 23일
댓글: sania urooj 2021년 2월 25일
Hey! I need to upsample ECG signals from 250hz to 1000hz. I used the given code but it's dividing my 10 sec signal to 2.5 sec (1 signal to 4 rows) retaining the same sample i.e 2500. I want to keep the duration of ECG signal 10 sec.
originalFs = 250;
desiredFs = 1000;
[p,q] = rat(desiredFs / originalFs)
y = load('chf01m.mat')
y = resample(y.val,p,q);
t= 1:length(y)
Ty = t./desiredFs
plot(Ty,y(1,:));
kindly tell me what I am missing here.
  댓글 수: 2
Mathieu NOE
Mathieu NOE 2021년 2월 23일
hello
As the two sampling frequency are related with factor 4 , I would simply use interpolation instead of resampling
so if x = original time vector , create new time vector xx with 4 times smaller time increments and do
yy = interp1(x,y,xx);
sania urooj
sania urooj 2021년 2월 25일
thanks @Mathieu NOE I got it.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Multirate Signal Processing에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by