MATLAB Answers

Interpolation Question Regarding Value Alignment

조회 수: 1(최근 30일)
Eric Yoshida
Eric Yoshida 23 Feb 2020
답변: KSSV 23 Feb 2020
I have 2 sets of data, both dependent on time. Y has about 300 measurements each spaced 4 seconds apart (one at .4, one at .8, etc), while X has about 100 measurements each spaced 3 seconds apart. How can I interpolate the measurements from Y to give me 100 Y values spaced 3 seconds apart (so they match up with the timing of X)

  댓글 수: 0

로그인 to comment.

답변(1개)

KSSV
KSSV 23 Feb 2020
Let t be your 4 seconds sampled time and y be your respective data.
dt = 3 ;
ti = min(t):dt:max(t) ;
yi = interp1(t,y,ti) ;

  댓글 수: 0

로그인 to comment.

이 질문에 답변하려면 로그인을(를) 수행하십시오.


Translated by