필터 지우기
필터 지우기

how to interpolate between 2 samples??

조회 수: 147 (최근 30일)
Good mind
Good mind 2017년 11월 29일
댓글: ANKUR KUMAR 2017년 12월 3일
i want doing linear interpolation between 2 samples 170 and 230. how can i ??
load ecg.m;
n=length(ecg);
fs=360;
ORS1_on_off=[170 230];

답변 (1개)

ANKUR KUMAR
ANKUR KUMAR 2017년 12월 1일
I am unable to understand your question completely. But I can guide you at some extent. Hope this helps you.
For 1D interpolation Suppose you have
A=[1 2 3 4 5 6];
B=[20 25 65 85 95 74 75];
and you want to interpolate A on 2.5, then you can use
interp1(A,B,2.5)
For 2D interpolation
latitude=[10:20];
longitude=[65:95];
rainfall=randi(75,11,31);
And we have to interpolate the rainfall data on 12.5 lat and 70.5 lon. Then you can use
interp2(latitude, longitude, rainfall',12.5,70.5)
  댓글 수: 2
Good mind
Good mind 2017년 12월 2일
편집: Good mind 2017년 12월 2일
thank you ANKUR,i have an ecg signal its first qrs complex is between 170 and 230, then i want to eliminate this qrs complex by linear interpolation between 170 and 230 that is to say
(x1,y1) =(170,17.8445 ) and (x2,y2)=(230,7.2072)
ANKUR KUMAR
ANKUR KUMAR 2017년 12월 3일
Do you want to find the correlation between (X1,Y1) and (X2,Y2)? Though, the correlation between any 2 points are either 1 or -1.

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

카테고리

Help CenterFile Exchange에서 Interpolation에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by