delay
Functions
-
int main(int argc, char *argv[])
delay [ option ] [ infile ]
-l int
length of vector \((1 \le L)\)
-m int
order of vector \((0 \le M)\)
-s int
start index \((S)\)
-k
keep sequence length
infile str
double-type data sequence
stdout
double-type delayed data sequence
The input of this command is
\[ \begin{array}{cccc} x(0), & x(1), & \ldots, & x(T-1) \end{array} \]and the output is\[ \begin{array}{cccc} \underbrace{0, \; \ldots, \; 0}_S, & x(0), & \ldots, & x(T-1). \end{array} \]If-k
option is specified, the output is\[ \begin{array}{cccc} \underbrace{0, \; \ldots, \; 0}_S, & x(0), & \ldots, & x(T-S-1). \end{array} \]If \(S\) is negative, the output is\[ \begin{array}{cccc} x(-S), & x(-S+1), & \ldots, & x(T-1). \end{array} \]See the following examples.
# data: 1, 2, 3 ramp -s 1 -l 3 | delay -s 2 | x2x +da # 0, 0, 1, 2, 3 ramp -s 1 -l 3 | delay -s 2 -k | x2x +da # 0, 0, 1 ramp -s 1 -l 3 | delay -s -2 | x2x +da # 3 ramp -s 1 -l 3 | delay -s -2 -k | x2x +da # 3, 0, 0
- Parameters:
argc – [in] Number of arguments.
argv – [in] Argument vector.
- Returns:
0 on success, 1 on failure.