end
Returns the last index of the collection being indexed.
Syntax
A(end)
Inputs
- A
- scalar | string | complex number | matrix
- B
- Any collection that can be indexed.
Example
Append an element onto the end of a vector.
A = [1, 2, 3, 4]
A(end + 1) = 7
A = [ 1 2 3 4 7 ]