Two Indices Separated by a Comma

A[i, j] is the element of A at i-th row and j-th column. Both i and j (or their elements) must be positive integers. Note that both indices can be vectors
>> A = [8, 1, 6; 3, 5, 7; 4, 9, 2]
   8    1    6
   3    5    7
   4    9    2
>> A[2,3]
   7
>> A[1, 1 : 3]   // the first row
   8    1    6
>> A[1 : 3, 2]   // the second column
   1
   5
   9
>> A[[2, 3], [2, 3]]  // the 2x2 submatrix on the lower right corner
   5    7
   9    2


oz 2009-12-22