Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

Interpolation Question Regarding Value Alignment

조회 수: 2 (최근 30일)
Eric Yoshida
Eric Yoshida 2020년 2월 23일
마감: MATLAB Answer Bot 2021년 8월 20일
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)

답변 (1개)

KSSV
KSSV 2020년 2월 23일
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) ;

Community Treasure Hunt

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

Start Hunting!

Translated by