<< upfirdn | FOSSEE_Signal_Processing_Toolbox | upsamplefill >>

FOSSEE_Signal_Processing_Toolbox >> FOSSEE_Signal_Processing_Toolbox > upsample

# upsample

Upsample the signal by inserting zeros between elements.

### Syntax

    y = upsample(x, n)
    y = upsample(x, n, phase)

### Parameters

x:

  Input signal (vector or matrix).

n:

  Upsampling factor (positive integer). Specifies the number of samples in the upsampled signal for each input sample.

phase (optional):

  Offset specifying the position of the original sample in the block of `n` samples. Default is 0.

y:

  Upsampled signal (vector or matrix).

### Description

The `upsample` function increases the sampling rate of the input signal `x` by inserting `n-1` zeros between every element. If `x` is a matrix, the function upsamples every column independently. The optional `phase` parameter controls the position of the original sample in the block of `n` samples.

### Examples

    // Upsample a row vector by a factor of 2:
    x = [1, 3, 5]
    y = upsample(x, 2)

### Authors

- FOSSEE Team
- toolbox@scilab.in

Report an issue
<< upfirdn | FOSSEE_Signal_Processing_Toolbox | upsamplefill >>