Navigation

Operators and Keywords

Function List:

C++ API

: isindex (ind)
: isindex (ind, n)

Return true if ind is a valid index.

Valid indices are either positive integers (although possibly of real data type), or logical arrays.

If present, n specifies the maximum extent of the dimension to be indexed. When possible the internal result is cached so that subsequent indexing using ind will not perform the check again.

Implementation Note: Strings are first converted to double values before the checks for valid indices are made. Unless a string contains the NULL character "\0", it will always be a valid index.

Package: octave