# Zero order hold interpolation and Nearest-neighbor interpolation?

Is there any difference between Zero order hold interpolation and Nearest-neighbor interpolation

I want to perform zero order hold interpolation in MATLAB,but there isn't any information about zero order hold in the description available on MATLAB help page link below,also shown in attached snapshot

So ,in MATLAB,if we want to implement Zero order hold interpolation,can we use the method"Nearest-neighbor"?

https://www.mathworks.com/help/matlab/ref/interp1.html#btwp6lt-1-method

• the only difference between ZOH interpolation and Nearest Neighbor interpolation is the former is delayed a half sample in comparison to the latter. – robert bristow-johnson Apr 3 at 20:09

The main difference I could see between the two is that zero-order hold is usually used in the context of interpolation of a 1-D signal, particularly to describe the action of a digital-to-analog converter. In that model, the zero-order hold is usually rendered as starting at the corresponding sample time $$n$$ and extending until the next sample instant $$n + 1$$.
Nearest-neighbor interpolation is usually drawn somewhat differently, where the region of influence of a particular sample is centered on the sample position, so instead of the value being held from sample times $$n$$ to $$n + 1$$, that sample value would instead influence the interpolated output from $$n - 0.5$$ to $$n + 0.5$$.