Referring to and Modifying the Matrix Elements:
To refer to matrix elements, the row and then the column indices are given in parentheses (always the row index initially and then the column). For illustration, this generates a matrix variable mat, and then refers to the value in the second row and third column of mat:
>> mat = [2:4; 3:5]
mat =
2 3 4
3 4 5
>> mat(2,3)
ans =
5