VSPLIT

From STX Wiki
Jump to navigationJump to search

VSPLIT - split vectors

Usage:

VSPLIT x l o inc ref

Inputs:
x The vector to be split. There is no default.
l The number of output elements. This must be a number greater than 0. There is no default.
o The index of the first element (i.e. the offset). This must be a number greater than or equal to 0. The default is 0.
inc The increment. This must be a number greater than 0. The default is 1.
ref N|No or 1|Y|YesThe default is No.
Outputs:
y The split part of vector (extracted elements) with the length l.
Description:

This atom can be used to split a vector or (in other words) to extract a sub-vector from a vector.

ref=0 or NO: y[i] = x[o + i.inc]
ref=1 or YES: y[i] = x[n-o-(i+1).inc]
with: i=0, 1, .., l-1

For both modes the parameters l, o and inc must match following conditions:

o >= 0; inc and l > 0; o + (l-1).inc < number of elements of x.

Navigation menu

Personal tools