Array Subscript Operator |
Keystroke: [
v[n
Returns the nth element of v. If v has no nth element, you see an appropriate error message.
M[m,n
Returns the element in row m and column n of M. If M has no mnth element, you'll see an appropriate error message.
M[100,50 := 0
Unspecified elements are filled with 0's. The expresssion above creates a 101 × 51 element matrix (assuming ORIGIN of 0), entirely filled with 0s. Be careful of inadvertently creating large arrays, or arrays with unexpected 0 elements by defining elements individually out of sequence.