optic.dsp.core.upsample

upsample(x, factor)

Upsample a signal by inserting zeros between samples.

Parameters:
  • x (np.array) – Input signal to upsample.

  • factor (int) – Upsampling factor. The signal will be upsampled by inserting factor - 1 zeros between each original sample.

Returns:

xUp – The upsampled signal with zeros inserted between samples.

Return type:

np.array

Notes

This function inserts zeros between the samples of the input signal to increase its sampling rate. The upsampling factor determines how many zeros are inserted between each original sample.

If the input signal is a 2D array, the upsampling is performed column-wise.

References

[1] P. S. R. Diniz, E. A. B. da Silva, e S. L. Netto, Digital Signal Processing: System Analysis and Design. Cambridge University Press, 2010.