<< diric <<<<<<< HEAD FOSSEE Signal Processing Toolbox ======= FOSSEE Signal Processing Toolbox >>>>>>> 3f916032cc0b2efdeafb838dd10e1141ead2cb27 dutycycle >>

<<<<<<< HEAD FOSSEE Signal Processing Toolbox >> FOSSEE Signal Processing Toolbox > downsample ======= FOSSEE Signal Processing Toolbox >> FOSSEE Signal Processing Toolbox > downsample >>>>>>> 3f916032cc0b2efdeafb838dd10e1141ead2cb27

downsample

This function downsamples the signal by selecting every nth element.

Calling Sequence

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

Parameters

x:

scalar, vector or matrix of real or complex numbers

n:

real number or vector

phase:

integer value, 0 <= phase <= (n - 1), default value 0, or logical

Description

This is an Octave function. This function downsamples the signal by selecting every nth element supplied as parameter 2. If x is a matrix, the function downsamples every column. If the phase is specified, every nth element is selected starting from the sample phase. The default phase is 0.

Examples

downsample([1,2,4],2)
ans  =
1.    4.

Report an issue
<< diric <<<<<<< HEAD FOSSEE Signal Processing Toolbox ======= FOSSEE Signal Processing Toolbox >>>>>>> 3f916032cc0b2efdeafb838dd10e1141ead2cb27 dutycycle >>