Index bound

Any elements of an index must be an integer no less than 1. Normally an index also has an upper bound, so that no reference to an non-existing element is made, unless the index expression is used as an lvalue (see next subsection). In particular, for an matrix, a row index should be an integer within the range [1, m], and a column index should be within the range [1, n], and an index value in a single-part index expression should be within the range [1, mn].
>> A = [1, 3, 5, 7, 11, 13, 17, 19];
>> A[9]
   Error 0 "9": index value 9 out of bound 1-8
>> A[9] = 23
   1   3   5   7  11  13  17  19 23



oz 2009-12-22