Contents Previous Next Subchapters Current Chapters-> vectorelem matrixelem rowcol seqrowcol seqsubvec subblock nonseq vecind endexp base colbase rowbase Parent Chapters-> Omatrix6 submatrices seqsubvec Search Tools-> contents reference index search

Sequential Elements Of A Vector
 Syntax vector`.blk(`starting index`, `number`)` See Also base , sequential rows or columns , and vector elements

Description
References the subvector with the specified starting index and number of elements, where starting index and number are integer scalars.

Tutorial
The value starting index specifies the first element of the subvector and the value number specifies the number of elements in the subvector. If you enter ```      x = [4, 6, 8, 10]      x.blk(2, 2) ``` O-Matrix will respond ```      [ 6 , 8 ] ``` You can also use `.blk` to assign a subvector. The result has the type that corresponds to coercion between the type of the original vector and the subvector. ```      x = {1, 2, 3, 4}      x.blk(2, 3) = {5.5, 5.5, 5.5}      x ``` results in ```      {      1      5.5      5.5      5.5      } ```