Up-sampling in MATLAB
Interpolation or up-sampling is the specific inverse of decimation. It is a data saving operation, in that all examples of x[n] are available in the extended signal y[n]. Interpolation works by adding (L–1) zero-valued examples for each input sample.
We will be using the interp() function to interpolate a signal. It is used to increase the sample rate of a signal by an integer factor.
Syntax: a = interp(x, r)
- x: input signal
- r: interpolation factor
Return Value: Returns interpolated signal
MATLAB code for interpolation of a signal: