upsample

Upsample a signal.

Syntax

output = upsample(x,n)

output = upsample(x,n,p)

Inputs

x
The signal to be upsampled. If x is a matrix, then each column is upsampled.
Type: double
Dimension: vector | matrix
n
The upsample factor.
Type: integer
Dimension: scalar
p
The offset to the first sample, within the period length.
Type: integer
Dimension: scalar

Outputs

output
The re-sampled signal.

Examples

Example with the default phase:
output = upsample([1 2 3],2)
output = [Matrix] 1 x 6
1  0  2  0  3  0
Example with the specified phase:
output = upsample([1 2 3],2,1)
output = [Matrix] 1 x 6
0  1  0  2  0  3