AlgoSim
Homepage | Screenshots | Gallery of Visualisation | User's Guide | Function Reference | Download | FAQ | Support | Bugs and Solutions | Donate

Reference: subvector

subvector(v, S) returns the vector composed of the components of v with indices in the set S. Thus, S is a set of integers, between 1 and the dimension dim(v) of v.

Examples: subvector(❨3, 5, 7, 9❩, {2, 4}) = ❨5, 9❩
          subvector(❨3, 5, 7, 9❩, [2, 4]) = ❨5, 7, 9❩