Vector and matrix element access
Jump to navigation
Jump to search
Elements of vectors and matrices can be accessed in two ways: With the mindex function and with angular brackets [ ]
.
[ expression ]
accesses an element of a vector.[ expression , expression ]
accesses an element of a matrix. Either of the expressions can be replaced by an asterisk*
, then the whole row or column will be returned as a vector.