Can I use a nearest neighbor extrapolation strategy with interp1?
25 views (last 30 days)
Is there a way that interp1 can be set up to use a nearest neighbor extrapolation approach (while also using an alternate interpolation appraoch)? In other words, values that come prior to the start of a vector use the first value from that vector, and values that come after the end of a vector use the last value from that vector.
The only options appear to be 'extrap' which uses the interpolation method, and a specification of a value. Maybe there is a clever way to specify a condition here that would return a value for the start or end of the vector?