| Contents | Index |
y=upsample(x,n)
y=upsample(x,n,phase)
y = upsample(x,n) increases the sampling rate of x by inserting n-1 zeros between samples. x can be a vector or a matrix. If x is a matrix, each column is considered a separate sequence. The upsampled y has x*n samples.
y = upsample(x,n,phase) specifies the number of samples by which to offset the upsampled sequence. phase must be an integer from 0 to n-1.
Increase the sampling rate of a sequence by 3:
x = [1 2 3 4];
y = upsample(x,3);
x,y
x =
1 2 3 4
y =
1 0 0 2 0 0 3 0 0 4 0 0
Increase the sampling rate of the sequence by 3 and add a phase offset of 2:
x = [1 2 3 4];
y = upsample(x,3,2);
x,y
x =
1 2 3 4
y =
0 0 1 0 0 2 0 0 3 0 0 4
Increase the sampling rate of a matrix by 3:
x = [1 2; 3 4; 5 6;];
y = upsample(x,3);
x,y
x =
1 2
3 4
5 6
y =
1 2
0 0
0 0
3 4
0 0
0 0
5 6
0 0
0 0
decimate | downsample | interp | interp1 | resample | spline | upfirdn

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |