Sampling Rate Conversion (Interpolation/Decimation)
Version 1.0.0.0 (1.5 KB) by
Vallabha Hampiholi
The program does interpolation or decimation on a given 1-d data in an array.
Given X with sampling rate Ft Hz and is used to generate another sequence Y with sampling rate Ft' Hz, then Sampling Rate ratio R is given by,
Ft'
R = ----
Ft
if R > 1, sampling process is known as interpolation
R < 1, sampling process is known as decimation
Example Usage:
t = 1:1/10:2;
X = sin (2 * pi * 10 * t) % 10 Hz sine wave
N = 3 % Interpolation/Decimation factor
Y = sample (X, N, 'UP')
Cite As
Vallabha Hampiholi (2026). Sampling Rate Conversion (Interpolation/Decimation) (https://www.mathworks.com/matlabcentral/fileexchange/35853-sampling-rate-conversion-interpolation-decimation), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Created with
R2008a
Compatible with any release
Platform Compatibility
Windows macOS LinuxCategories
- Signal Processing > Signal Processing Toolbox > Digital and Analog Filters > Multirate Signal Processing >
Find more on Multirate Signal Processing in Help Center and MATLAB Answers
Tags
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
| Version | Published | Release Notes | |
|---|---|---|---|
| 1.0.0.0 |
