decimate

Functions

int main(int argc, char *argv[])

decimate [ option ] [ infile ]

  • -l int

    • length of vector \((1 \le L)\)

  • -m int

    • order of vector \((0 \le M)\)

  • -s int

    • start index \((0 \le S)\)

  • -p int

    • decimation period \((1 \le P)\)

  • infile str

    • double-type data sequence

  • stdout

    • double-type decimated data sequence

The input is a sequence of \(L\)-dimensional vectors:

\[ \begin{array}{cccc} \boldsymbol{x}(0), & \boldsymbol{x}(1), & \boldsymbol{x}(2), & \ldots, \end{array} \]
where \(L=M+1\). The output is the sequence resampled from the input:
\[ \begin{array}{cccc} \boldsymbol{x}(S), & \boldsymbol{x}(S+P), & \boldsymbol{x}(S+2P), & \ldots, \end{array} \]
where \(S\) is the start index and \(P\) is the decimation factor.

The following example decimates data in data.d while keeping their original indices.

decimate -p 5 < data.d | interpolate -p 5 > data.dec
Parameters:
  • argc[in] Number of arguments.

  • argv[in] Argument vector.

Returns:

0 on success, 1 on failure.

See also

interpolate