get_member

Returns an element from a vector or matrix type.

Inputs

value

The vector or matrix to query.

index

The index of the element to access. For matrix types, the indices are accessed in column-major order. To access the (r,c)-th member, use C*c+r as the index, where C is the number of columns in the matrix.

Output

output

The value at the requested element index, or a default value if the index was out of bounds.