Signal Processing Toolbox™ provides a number of functions that resample a signal at a higher or lower rate.
Apply FIR filter with resampling
Cubic spline interpolation
Other 1-D interpolation
Resample at new rate
For examples, see
resample function changes the sample rate for a sequence to any rate
that is proportional to the original by a ratio of two integers. The basic syntax
y = resample(x,p,q)
where the function resamples the sequence
the original sample rate. The length of the result
p/q times the length of
One resampling application is the conversion of digitized audio signals from one sample rate to another, such as from 48 kHz (the digital audio tape standard) to 44.1 kHz (the compact disc standard). See Convert from DAT Rate to CD Sample Rate for an example.
resample applies a lowpass filter to the input sequence to prevent
aliasing during resampling. The function designs this filter using the
firls function with a Kaiser window. You can control the filter
length and the beta parameter of the Kaiser window. Alternatively, you can use the
intfilt to design an interpolation
interp functions are equivalent to
1, respectively. These functions
provide different antialiasing filtering options, and they incur a slight signal
delay due to filtering.
The toolbox also contains a function,
that applies an FIR filter to an input sequence and outputs the filtered
sequence at a sample rate different than its original. See Multirate Filter Bank Implementation.
The standard MATLAB® environment contains a function,
spline, that works with irregularly spaced
data. The MATLAB function
interpolation, or table lookup, using various methods including linear
and cubic interpolation.