Info

This question is closed. Reopen it to edit or answer.

Interpolation Question Regarding Value Alignment

1 view (last 30 days)
Eric Yoshida
Eric Yoshida on 23 Feb 2020
Closed: MATLAB Answer Bot on 20 Aug 2021
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)

Answers (1)

KSSV
KSSV on 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) ;

Community Treasure Hunt

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

Start Hunting!